Przeglądaj źródła

修复创建群组bug

Huping 1 rok temu
rodzic
commit
0a6243db55

+ 1 - 1
TMessagesProj/src/main/java/org/telegram/cricdit/ui/MeActivity.java

@@ -347,7 +347,7 @@ public class MeActivity extends BaseTabActivity<MePresenter> implements MeView {
         });
 
         mCommonAboutUs.setOnClickListener(v -> {
-            presentFragment(new WebviewActivity(Constants.WEB_URL_ABOUT_US + System.currentTimeMillis(), ""));
+            presentFragment(new WebviewActivity(Constants.WEB_URL_ABOUT_US, ""));
         });
 
         view.findViewById(R.id.me_profile_post_container).setOnClickListener(v -> {

+ 9 - 3
TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java

@@ -16387,10 +16387,16 @@ public class MessagesController extends BaseController implements NotificationCe
                 try {
                     String string = response.body().string();
                     if (!TextUtils.isEmpty(string)) {
-                        BaseCrcmaBean baseBean = GsonHel.fromJson(string, BaseCrcmaBean.class);
-                        if (baseBean != null && baseBean.data != null && !TextUtils.isEmpty(baseBean.data.num)) {
-                            ToastUtil.show(ApplicationLoader.applicationContext, LocaleController.getString(R.string.CdCrcma) + baseBean.data.num);
+
+                        if (string.contains("\"data\":\"\"")) {
+
+                        } else {
+                            BaseCrcmaBean baseBean = GsonHel.fromJson(string, BaseCrcmaBean.class);
+                            if (baseBean != null && baseBean.data != null && !TextUtils.isEmpty(baseBean.data.num)) {
+                                ToastUtil.show(ApplicationLoader.applicationContext, LocaleController.getString(R.string.CdCrcma) + baseBean.data.num);
+                            }
                         }
+
                     }
 
                 } catch (IOException e) {

+ 30 - 24
TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java

@@ -468,7 +468,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
     private int settingsSectionRow;
     private int settingsSectionRow2;
     private int notificationRow;
-    private int groupTabRow;
+//    private int groupTabRow;
     private int languageRow;
     private int privacyRow;
     private int dataRow;
@@ -3105,12 +3105,14 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
                 onWriteButtonClick();
             } else if (position == premiumRow) {
                 presentFragment(new PremiumPreviewFragment("settings"));
-            } else if (position == groupTabRow) {
-                //TODO 点击后跳转
-                if (chatInfo!=null && chatInfo.can_set_username) {
-
-                }
-            } else if (position == personFollowRow) {
+            }
+//            else if (position == groupTabRow) {
+//                //TODO 点击后跳转
+//                if (chatInfo!=null && chatInfo.can_set_username) {
+//
+//                }
+//            }
+            else if (position == personFollowRow) {
                 //TODO 点击后跳转
                 follow2();
             } else {
@@ -6428,7 +6430,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
         settingsSectionRow = -1;
         settingsSectionRow2 = -1;
         notificationRow = -1;
-        groupTabRow = -1;
+//        groupTabRow = -1;
         languageRow = -1;
         premiumRow = -1;
         premiumSectionsRow = -1;
@@ -6649,7 +6651,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
             }
             notificationsRow = rowCount++;
 
-            groupTabRow = rowCount++;
+//            groupTabRow = rowCount++;
 
             infoSectionRow = rowCount++;
 
@@ -8278,14 +8280,14 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
                 case VIEW_TYPE_TEXT_DETAIL:
                     TextDetailCell detailCell = (TextDetailCell) holder.itemView;
                     //TODO 设置群标签
-                    if (position == groupTabRow) {
-                        System.out.println("qwerqwerrrr   "+chatInfo.can_set_username);
-
-                        if (chatInfo.can_set_username) {
-
-                        }
-                        detailCell.setTextAndValue("Label","None",false);
-                    }
+//                    if (position == groupTabRow) {
+//                        System.out.println("qwerqwerrrr   "+chatInfo.can_set_username);
+//
+//                        if (chatInfo.can_set_username) {
+//
+//                        }
+//                        detailCell.setTextAndValue("Label","None",false);
+//                    }
 
                     if (position == usernameRow) {
                         Drawable drawable = ContextCompat.getDrawable(detailCell.getContext(), R.drawable.msg_qr_mini);
@@ -8737,9 +8739,10 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
                 return VIEW_TYPE_PERSION_DETAIL;
             } else if (position == personFollowRow) {
                 return VIEW_TYPE_PERSION_FOLLOW;
-            } else if (position == groupTabRow) {
-                return VIEW_TYPE_TEXT_DETAIL;
             }
+//            else if (position == groupTabRow) {
+//                return VIEW_TYPE_TEXT_DETAIL;
+//            }
 //            else if (position == premiumRow) {
 //                return VIEW_TYPE_PREMIUM_TEXT_CELL;
 //            }
@@ -10391,7 +10394,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
             put(++pointer, settingsSectionRow, sparseIntArray);
             put(++pointer, settingsSectionRow2, sparseIntArray);
             put(++pointer, notificationRow, sparseIntArray);
-            put(++pointer, groupTabRow, sparseIntArray);
+//            put(++pointer, groupTabRow, sparseIntArray);
             put(++pointer, languageRow, sparseIntArray);
             put(++pointer, premiumRow, sparseIntArray);
             put(++pointer, premiumSectionsRow, sparseIntArray);
@@ -10549,10 +10552,13 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
                 if (response.body() != null) {
                     try {
                         String string = response.body().string();
-                        ProfileSelfProfileBean profileSelfProfileBean = GsonHel.fromJson(string, ProfileSelfProfileBean.class);
-                        if (profileSelfProfileBean != null && profileSelfProfileBean.data != null) {
-                            isFollow = profileSelfProfileBean.data.is_follow;
-                            listAdapter.notifyItemChanged(personFollowRow);
+                        if (string.contains("\"data\":\"\"")) {
+                        } else {
+                            ProfileSelfProfileBean profileSelfProfileBean = GsonHel.fromJson(string, ProfileSelfProfileBean.class);
+                            if (profileSelfProfileBean != null && profileSelfProfileBean.data != null) {
+                                isFollow = profileSelfProfileBean.data.is_follow;
+                                listAdapter.notifyItemChanged(personFollowRow);
+                            }
                         }
                     } catch (IOException e) {
                         e.printStackTrace();

+ 0 - 20
TMessagesProj_App/bundleAfat/release/output-metadata.json

@@ -1,20 +0,0 @@
-{
-  "version": 3,
-  "artifactType": {
-    "type": "APK",
-    "kind": "Directory"
-  },
-  "applicationId": "com.cricdit.cricdit",
-  "variantName": "bundleAfatRelease",
-  "elements": [
-    {
-      "type": "SINGLE",
-      "filters": [],
-      "attributes": [],
-      "versionCode": 23,
-      "versionName": "0.2.2",
-      "outputFile": "Cricdit0.2.2.apk"
-    }
-  ],
-  "elementType": "File"
-}

+ 2 - 2
gradle.properties

@@ -15,8 +15,8 @@
 #Sat Mar 12 05:53:50 MSK 2016
 #APP_VERSION_NAME=9.0.2
 #APP_VERSION_CODE=2808
-APP_VERSION_NAME=0.2.3
-APP_VERSION_CODE=24
+APP_VERSION_NAME=0.2.4
+APP_VERSION_CODE=25
 #APP_PACKAGE=org.telegram.messenger
 APP_PACKAGE=com.cricdit.cricdit
 RELEASE_KEY_PASSWORD=123456