DESKTOP-JJ6HLMB 1 yıl önce
ebeveyn
işleme
6ab1a8fcda

+ 4 - 0
TMessagesProj/src/main/java/org/telegram/cricdit/ui/NewsDetailCommentFragment.java

@@ -235,6 +235,7 @@ public class NewsDetailCommentFragment extends BaseActivity<CommentPresenter> im
         tvNumZan = rootView.findViewById(R.id.tv_num_zan);
         ivShare = rootView.findViewById(R.id.iv_share);
         rlBottom = rootView.findViewById(R.id.rl_bottom);
+        statusView = rootView.findViewById(R.id.status_view);
         mTextView.setOnClickListener(this);
         srfl.setEnableRefresh(false);
         srfl.setOnRefreshListener(new OnRefreshListener() {
@@ -893,6 +894,9 @@ public class NewsDetailCommentFragment extends BaseActivity<CommentPresenter> im
 
     @Override
     public void showError(Throwable e) {
+        if (alertDialog != null) {
+            alertDialog.dismiss();
+        }
         nestedScrollview.setVisibility(View.GONE);
         if (!(e instanceof ApiException)) {
             statusView.showNoNetwork(LocaleController.getString(R.string.network_failed));

+ 4 - 0
TMessagesProj/src/main/java/org/telegram/cricdit/ui/RankDetailCommentFragment.java

@@ -203,6 +203,7 @@ public class RankDetailCommentFragment extends BaseActivity<CommentPresenter> im
         tvNumZan = rootView.findViewById(R.id.tv_num_zan);
         ivShare = rootView.findViewById(R.id.iv_share);
         rlBottom = rootView.findViewById(R.id.rl_bottom);
+        statusView = rootView.findViewById(R.id.status_view);
         mTextView.setOnClickListener(this);
         srfl.setEnableRefresh(false);
         srfl.setOnRefreshListener(new OnRefreshListener() {
@@ -1026,6 +1027,9 @@ public class RankDetailCommentFragment extends BaseActivity<CommentPresenter> im
 
     @Override
     public void showError(Throwable e) {
+        if (alertDialog != null) {
+            alertDialog.dismiss();
+        }
         nestedScrollview.setVisibility(View.GONE);
         if (!(e instanceof ApiException)) {
             statusView.showNoNetwork(LocaleController.getString(R.string.network_failed));

+ 1 - 0
TMessagesProj/src/main/res/layout/activity_news_detail_comment.xml

@@ -159,6 +159,7 @@
         android:layout_height="match_parent"
         app:emptyView="@layout/layout_no_data"
         app:errorView="@layout/layout_no_data"
+        android:visibility="gone"
         app:noNetworkView="@layout/layout_no_data" />
 
 </RelativeLayout>

+ 1 - 0
TMessagesProj/src/main/res/layout/activity_rank_detail_comment.xml

@@ -131,6 +131,7 @@
         android:id="@+id/status_view"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
+        android:visibility="gone"
         app:emptyView="@layout/layout_no_data"
         app:errorView="@layout/layout_no_data"
         app:noNetworkView="@layout/layout_no_data" />

+ 10 - 1
TMessagesProj/src/main/res/layout/fragment_comment.xml

@@ -62,7 +62,7 @@
             android:paddingTop="9dp"
             android:paddingRight="18dp"
             android:paddingBottom="9dp"
-            android:visibility="visible"
+            android:visibility="gone"
             app:layout_constraintBottom_toBottomOf="parent">
 
 
@@ -133,6 +133,15 @@
                 android:textColor="#ff333333"
                 android:textSize="14sp" />
         </RelativeLayout>
+
+        <com.classic.common.MultipleStatusView
+            android:id="@+id/status_view"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            app:emptyView="@layout/layout_no_data"
+            app:errorView="@layout/layout_no_data"
+            app:noNetworkView="@layout/layout_no_data" />
     </RelativeLayout>
 
+
 </androidx.constraintlayout.widget.ConstraintLayout>