Пример #1
0
 private final void actualShareGroup()
 {
   if (this.mTalkingGroupInfo == null)
     return;
   Locale localLocale = Locale.CHINESE;
   String str1 = CONTENTS[1];
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = this.mTalkingGroupInfo.groupName;
   String str2 = String.format(localLocale, str1, arrayOfObject);
   QTMSGManage.getInstance().sendStatistcsMessage("im_share");
   ShareUtil.shareToPlatform(str2, 1, 2);
 }
Пример #2
0
 private void actualCheckin()
 {
   if (this.mTalkingGroupInfo == null)
     return;
   if (!IMContacts.getInstance().hasWatchedGroup(this.mTalkingId))
     InfoManager.getInstance().getUserProfile().followGroup(this.mTalkingId);
   String str1 = "";
   List localList = this.mTalkingGroupInfo.lstAdmins;
   int i;
   Object localObject;
   UserInfo localUserInfo;
   String str6;
   String str4;
   if ((localList != null) && (localList.size() > 0))
   {
     i = 0;
     localObject = str1;
     if (i < localList.size())
     {
       localUserInfo = (UserInfo)localList.get(i);
       if ((localUserInfo instanceof AdminInfo))
       {
         str6 = ((AdminInfo)localUserInfo).weiboName;
         if ((str6 != null) && (str6.length() != 0))
           break label290;
         str4 = localUserInfo.snsInfo.sns_name;
       }
     }
   }
   while (true)
   {
     String str5 = (String)localObject + "@" + str4 + " ";
     i++;
     localObject = str5;
     break;
     str4 = localUserInfo.snsInfo.sns_name;
     continue;
     str1 = (String)localObject + "还有";
     Locale localLocale = Locale.CHINESE;
     String str2 = CONTENTS[2];
     Object[] arrayOfObject = new Object[3];
     arrayOfObject[0] = this.mTalkingGroupInfo.groupName;
     arrayOfObject[1] = str1;
     arrayOfObject[2] = this.mTalkingGroupInfo.groupName;
     String str3 = String.format(localLocale, str2, arrayOfObject);
     sendMessage("签个到,大家好呀~~", 1);
     QTMSGManage.getInstance().sendStatistcsMessage("im_checkin");
     ShareUtil.shareToPlatform(str3, 8, 9);
     return;
     label290: str4 = str6;
   }
 }
Пример #3
0
 private void actualFlowerToUser(UserInfo paramUserInfo)
 {
   if (!IMContacts.getInstance().hasWatchedGroup(this.mTalkingId))
     InfoManager.getInstance().getUserProfile().followGroup(this.mTalkingId);
   if ((paramUserInfo instanceof AdminInfo))
   {
     str1 = ((AdminInfo)paramUserInfo).weiboName;
     if ((str1 != null) && (str1.length() != 0));
   }
   for (String str1 = paramUserInfo.snsInfo.sns_name; ; str1 = paramUserInfo.snsInfo.sns_name)
   {
     String str2 = String.format(Locale.CHINESE, CONTENTS[0], new Object[] { str1 });
     QTMSGManage.getInstance().sendStatistcsMessage("im_flower");
     ShareUtil.shareToPlatform(str2, 10, 11);
     return;
   }
 }
Пример #4
0
 private void doClickEvent() {
   if ((this.mNode == null) || (this.mSelectedIndex == -1)) return;
   if (this.mSelectedIndex == 2) {
     QTMSGManage.getInstance().sendStatistcsMessage("resumerecent_close");
     EventDispacthManager.getInstance().dispatchAction("closerecentplay", null);
     return;
   }
   Object localObject;
   if (this.mSelectedIndex == 1) {
     localObject = new CustomPopActionParam.Builder();
     ((CustomPopActionParam.Builder) localObject).setTitle(getTitle()).addNode(this.mNode);
     if (this.mDownloadState == 0) ((CustomPopActionParam.Builder) localObject).addButton(1);
     ((CustomPopActionParam.Builder) localObject).addButton(0);
     localObject = ((CustomPopActionParam.Builder) localObject).create();
     EventDispacthManager.getInstance().dispatchAction("showoperatepop", localObject);
     return;
   }
   int i;
   if (this.mNode.nodeName.equalsIgnoreCase("program")) {
     i = ((ProgramNode) this.mNode).getCurrPlayStatus();
     localObject = null;
   }
   while (true) {
     if (i == 2) {
       if (InfoManager.getInstance().root().mPersonalCenterNode.reserveNode.isExisted(this.mNode))
         InfoManager.getInstance()
             .root()
             .mPersonalCenterNode
             .reserveNode
             .cancelReserve(((ProgramNode) this.mNode).id);
       while (true) {
         invalidate();
         label194:
         if (!this.mBelongToPodcasterInfo) break label319;
         QTMSGManage.getInstance().sendStatistcsMessage("PodcasterInfo", "收听");
         return;
         if (this.mNode.nodeName.equalsIgnoreCase("ondemandprogram")) {
           localObject = null;
           i = 3;
           break;
         }
         if (!this.mNode.nodeName.equalsIgnoreCase("playhistory")) break label329;
         QTMSGManage.getInstance().sendStatistcsMessage("resumerecent_play");
         localObject = ((PlayHistoryNode) this.mNode).playNode;
         i = 1;
         break;
         InfoManager.getInstance()
             .root()
             .mPersonalCenterNode
             .reserveNode
             .addReserveNode((ProgramNode) this.mNode);
       }
     }
     ControllerManager localControllerManager = ControllerManager.getInstance();
     if (localObject != null) ;
     while (true) {
       localControllerManager.redirectToPlayViewByNode((Node) localObject, true);
       break label194;
       label319:
       break;
       localObject = this.mNode;
     }
     label329:
     localObject = null;
     i = 1;
   }
 }
Пример #5
0
 public void update(String paramString, Object paramObject)
 {
   GroupInfo localGroupInfo2;
   GroupInfo localGroupInfo3;
   if (paramString.equalsIgnoreCase("setData"))
   {
     this.mAdmins.clear();
     if ((paramObject instanceof GroupInfo))
     {
       localGroupInfo2 = (GroupInfo)paramObject;
       this.mTalkingId = localGroupInfo2.groupId;
       ChatMode.setMode(1);
       int m;
       if ((localGroupInfo2.lstAdmins != null) && (localGroupInfo2.lstAdmins.size() > 0))
         m = 0;
       while (m < localGroupInfo2.lstAdmins.size())
       {
         this.mAdmins.add(((UserInfo)localGroupInfo2.lstAdmins.get(m)).userKey);
         m++;
         continue;
         localGroupInfo3 = IMAgent.getInstance().getGroupInfo(this.mTalkingId);
         if (localGroupInfo3 != null)
           break label266;
         IMAgent.getInstance().loadGroupInfo(this.mTalkingId, this);
       }
       this.mTalkingUserInfo = null;
       this.mTalkingGroupInfo = localGroupInfo2;
       this.mTalkingBlocked = false;
       this.mMessage = null;
       QTMSGManage.getInstance().sendStatistcsMessage("groupChat", "enter");
       String str4 = QTLogger.getInstance().buildEnterIMLog(7);
       if (str4 != null)
         LogModule.getInstance().send("IMUI", str4);
       this.mHeadView.update("setData", localGroupInfo2);
       label213: this.mDatas.clear();
       this.mLastTimestamp = 0L;
       this.mLoading = true;
       this.mDatas.add(new ChatItem(32, "正在加载聊天消息"));
       this.mAdapter.notifyDataSetChanged();
       changeChatMode();
     }
   }
   label266: 
   do
   {
     return;
     localGroupInfo2.update(localGroupInfo3);
     if ((localGroupInfo2.lstAdmins == null) || (localGroupInfo2.lstAdmins.size() <= 0))
       break;
     for (int k = 0; k < localGroupInfo2.lstAdmins.size(); k++)
       this.mAdmins.add(((UserInfo)localGroupInfo2.lstAdmins.get(k)).userKey);
     break;
     if ((paramObject instanceof UserInfo))
     {
       UserInfo localUserInfo = (UserInfo)paramObject;
       this.mTalkingId = localUserInfo.userKey;
       ChatMode.setMode(0);
       this.mTalkingUserInfo = localUserInfo;
       this.mTalkingGroupInfo = null;
       this.mTalkingBlocked = localUserInfo.isBlocked;
       this.mMessage = null;
       QTMSGManage.getInstance().sendStatistcsMessage("userChat", "enter");
       String str3 = QTLogger.getInstance().buildEnterIMLog(8);
       if (str3 != null)
         LogModule.getInstance().send("IMUI", str3);
       this.mHeadView.update("setData", localUserInfo);
       break label213;
     }
     if ((paramObject instanceof IMMessage))
     {
       IMMessage localIMMessage2 = (IMMessage)paramObject;
       this.mTalkingId = localIMMessage2.mFromID;
       ChatMode.setMode(0);
       UserProfile localUserProfile = UserProfileManager.getInstance().getUserProfile(this.mTalkingId);
       if (localUserProfile == null)
         UserProfileManager.getInstance().loadUserInfo(this.mTalkingId, this);
       while (true)
       {
         this.mTalkingGroupInfo = null;
         this.mMessage = localIMMessage2;
         QTMSGManage.getInstance().sendStatistcsMessage("userChat", "enter");
         String str2 = QTLogger.getInstance().buildEnterIMLog(8);
         if (str2 != null)
           LogModule.getInstance().send("IMUI", str2);
         this.mHeadView.update("setData", localIMMessage2);
         break;
         this.mTalkingUserInfo = localUserProfile.getUserInfo();
       }
     }
     if (!(paramObject instanceof String))
       break label213;
     this.mTalkingId = ((String)paramObject);
     ChatMode.setMode(1);
     GroupInfo localGroupInfo1 = IMAgent.getInstance().getGroupInfo(this.mTalkingId);
     if (localGroupInfo1 == null)
       IMAgent.getInstance().loadGroupInfo(this.mTalkingId, this);
     while (true)
     {
       this.mTalkingUserInfo = null;
       this.mTalkingGroupInfo = localGroupInfo1;
       this.mTalkingBlocked = false;
       this.mMessage = null;
       QTMSGManage.getInstance().sendStatistcsMessage("groupChat", "enter");
       String str1 = QTLogger.getInstance().buildEnterIMLog(7);
       if (str1 != null)
         LogModule.getInstance().send("IMUI", str1);
       this.mHeadView.update("setData", localGroupInfo1);
       break;
       if ((localGroupInfo1.lstAdmins != null) && (localGroupInfo1.lstAdmins.size() > 0))
         for (int j = 0; j < localGroupInfo1.lstAdmins.size(); j++)
           this.mAdmins.add(((UserInfo)localGroupInfo1.lstAdmins.get(j)).userKey);
     }
     if (paramString.equalsIgnoreCase("addmessage"))
     {
       if (this.mLoading)
       {
         this.mDatas.clear();
         this.mLoading = false;
       }
       IMMessage localIMMessage1 = (IMMessage)paramObject;
       long l = localIMMessage1.publish;
       if (l - this.mLastTimestamp >= 1800L)
       {
         this.mDatas.add(new ChatItem(32, getTimestampBySecond(l)));
         this.mLastTimestamp = l;
       }
       List localList = this.mDatas;
       if (isAdmin(localIMMessage1.mFromID));
       for (int i = 20; ; i = 17)
       {
         localList.add(new ChatItem(i, localIMMessage1));
         this.mAdapter.notifyDataSetChanged();
         return;
       }
     }
     if (paramString.equalsIgnoreCase("addhistory"))
     {
       if (paramObject == null)
       {
         if (this.mLoading)
         {
           this.mDatas.clear();
           this.mLoading = false;
           this.mOldestMsgSeq = 0L;
           this.mOldestTimeStamp = 0L;
           this.mAdapter.notifyDataSetChanged();
         }
         this.mAdapter.notifyDataSetChanged();
         this.mListView.onRefreshComplete();
         return;
       }
       if (this.mLoading)
       {
         this.mDatas.clear();
         this.mLoading = false;
       }
       addHistoryMessages((List)paramObject);
       return;
     }
     if (paramString.equalsIgnoreCase("closeKeyboard"))
     {
       this.mInputView.update(paramString, paramObject);
       return;
     }
     if (paramString.equalsIgnoreCase("needAccount"))
     {
       onEvent(this, paramString, paramObject);
       return;
     }
   }
   while (!paramString.equalsIgnoreCase("atTa"));
   if (this.mJoinView.getVisibility() == 0)
   {
     Toast.makeText(getContext(), "请先加入群聊", 0).show();
     return;
   }
   this.mJoinView.setVisibility(8);
   this.mInputView.update(paramString, paramObject);
 }
Пример #6
0
  public void onEvent(Object paramObject1, String paramString, Object paramObject2)
  {
    if (paramString.equalsIgnoreCase("sendDiscuss"))
      sendMessage((String)paramObject2, 0);
    ChatActionsView.ChatActionType localChatActionType;
    do
    {
      return;
      if (paramString.equalsIgnoreCase("expression"))
      {
        if (this.isInputShowing)
        {
          this.mViewState = 1;
          this.mInputView.update("closeKeyboard", null);
          return;
        }
        if (this.mViewState == 1)
        {
          this.mViewState = 0;
          requestLayout();
          return;
        }
        if (!CloudCenter.getInstance().isLogin())
        {
          CloudCenter.OnLoginEventListerner local4 = new CloudCenter.OnLoginEventListerner()
          {
            public void onLoginFailed(int paramAnonymousInt)
            {
            }

            public void onLoginSuccessed(int paramAnonymousInt)
            {
              QTMSGManage.getInstance().sendStatistcsMessage("chat_functionclick", "expression");
              ImChatMainView.access$302(ImChatMainView.this, 1);
              ImChatMainView.this.mInputView.update("closeKeyboard", null);
              ImChatMainView.this.requestLayout();
            }
          };
          EventDispacthManager.getInstance().dispatchAction("showLogin", local4);
          return;
        }
        QTMSGManage.getInstance().sendStatistcsMessage("chat_functionclick", "expression");
        this.mViewState = 1;
        this.mInputView.update("closeKeyboard", null);
        requestLayout();
        return;
      }
      if (paramString.equalsIgnoreCase("expand"))
      {
        if (this.isInputShowing)
        {
          this.mViewState = 3;
          this.mInputView.update("closeKeyboard", null);
          return;
        }
        if (this.mViewState == 3)
        {
          this.mViewState = 0;
          requestLayout();
          return;
        }
        this.mViewState = 3;
        requestLayout();
        return;
      }
      if (paramString.equalsIgnoreCase("inviteFriends"))
      {
        if (this.isInputShowing)
        {
          this.mViewState = 2;
          this.mInputView.update("closeKeyboard", null);
          return;
        }
        if (this.mViewState != 2)
        {
          this.mViewState = 2;
          requestLayout();
          return;
        }
        this.mViewState = 0;
        requestLayout();
        return;
      }
      if (paramString.equalsIgnoreCase("selectExpression"))
      {
        this.mInputView.update("addExpression", paramObject2);
        return;
      }
      if (paramString.equalsIgnoreCase("deleteExpression"))
      {
        this.mInputView.update(paramString, paramObject2);
        return;
      }
      if (paramString.equalsIgnoreCase("scrollToFirstIndexAtMe"))
      {
        dispatchActionEvent(paramString, paramObject2);
        return;
      }
      if (paramString.equalsIgnoreCase("useraction"))
      {
        if (!CloudCenter.getInstance().isLogin())
        {
          CloudCenter.OnLoginEventListerner local5 = new CloudCenter.OnLoginEventListerner()
          {
            public void onLoginFailed(int paramAnonymousInt)
            {
            }

            public void onLoginSuccessed(int paramAnonymousInt)
            {
              InfoManager.getInstance().getUserProfile().followGroup(ImChatMainView.this.mTalkingId);
              ImChatMainView.this.mJoinView.setVisibility(8);
            }
          };
          EventDispacthManager.getInstance().dispatchAction("showLogin", local5);
          return;
        }
        InfoManager.getInstance().getUserProfile().followGroup(this.mTalkingId);
        this.mJoinView.setVisibility(8);
        return;
      }
      if (paramString.equalsIgnoreCase("flowerToAdmin"))
      {
        flowerToUser((UserInfo)paramObject2);
        return;
      }
      if (!paramString.equalsIgnoreCase("chatActionType"))
        break;
      localChatActionType = (ChatActionsView.ChatActionType)paramObject2;
      if (localChatActionType == ChatActionsView.ChatActionType.SHARE)
      {
        shareGroup();
        return;
      }
      if (localChatActionType == ChatActionsView.ChatActionType.ASKNAME)
      {
        sendMessage("现在播的什么歌?", 0);
        return;
      }
    }
    while ((localChatActionType == ChatActionsView.ChatActionType.ANSWERNAME) || (localChatActionType != ChatActionsView.ChatActionType.COLLECTION));
    return;
    if (paramString.equalsIgnoreCase("shareToPlatform"))
    {
      invite(((Integer)paramObject2).intValue());
      return;
    }
    dispatchActionEvent(paramString, paramObject2);
  }
Пример #7
0
 private void invite(int paramInt)
 {
   QTMSGManage.getInstance().sendStatistcsMessage("im_invite", String.valueOf(paramInt));
   ShareUtil.inviteByPlatformIm(getContext(), paramInt, CONTENTS[3]);
 }