Show new icon as error image as well

Closes #223
This commit is contained in:
Balazs Toldi 2024-07-19 13:36:17 +02:00
parent 577d5b8e6f
commit 4741198c78
17 changed files with 17 additions and 18 deletions

View File

@ -151,7 +151,7 @@ public class SubredditMultiselectionActivity extends BaseActivity implements Act
if (subscribedSubredditData == null || subscribedSubredditData.size() == 0) {
mRecyclerView.setVisibility(View.GONE);
mLinearLayout.setVisibility(View.VISIBLE);
mGlide.load(R.drawable.error_image).into(mImageView);
mGlide.load(R.mipmap.ic_launcher_round).into(mImageView);
} else {
mLinearLayout.setVisibility(View.GONE);
mRecyclerView.setVisibility(View.VISIBLE);

View File

@ -278,7 +278,7 @@ public class TrendingActivity extends BaseActivity {
private void showErrorView(int stringId) {
errorLinearLayout.setVisibility(View.VISIBLE);
mGlide.load(R.drawable.error_image).into(errorImageView);
mGlide.load(R.mipmap.ic_launcher_round).into(errorImageView);
errorTextView.setText(stringId);
}

View File

@ -259,7 +259,7 @@ public class WikiActivity extends BaseActivity {
swipeRefreshLayout.setRefreshing(false);
mFetchWikiInfoLinearLayout.setVisibility(View.VISIBLE);
mFetchWikiInfoTextView.setText(stringResId);
mGlide.load(R.drawable.error_image).into(mFetchWikiInfoImageView);
mGlide.load(R.mipmap.ic_launcher_round).into(mFetchWikiInfoImageView);
}
@Override

View File

@ -137,7 +137,7 @@ public class BlockedCommunitiesListingFragment extends Fragment implements Fragm
if (subscribedSubredditData == null || subscribedSubredditData.size() == 0) {
mRecyclerView.setVisibility(View.GONE);
mLinearLayout.setVisibility(View.VISIBLE);
mGlide.load(R.drawable.error_image).into(mImageView);
mGlide.load(R.mipmap.ic_launcher_round).into(mImageView);
} else {
mLinearLayout.setVisibility(View.GONE);
mRecyclerView.setVisibility(View.VISIBLE);

View File

@ -122,7 +122,7 @@ public class BlockedInstancesListingFragment extends Fragment implements Fragmen
if (blockedInstanceData == null || blockedInstanceData.size() == 0) {
mRecyclerView.setVisibility(View.GONE);
mLinearLayout.setVisibility(View.VISIBLE);
mGlide.load(R.drawable.error_image).into(mImageView);
mGlide.load(R.mipmap.ic_launcher_round).into(mImageView);
mErrorTextView.setText(R.string.no_blocked_instances);
} else {
mLinearLayout.setVisibility(View.GONE);

View File

@ -122,7 +122,7 @@ public class BlockedUsersListingFragment extends Fragment implements FragmentCom
if (subscribedUserData == null || subscribedUserData.size() == 0) {
mRecyclerView.setVisibility(View.GONE);
mLinearLayout.setVisibility(View.VISIBLE);
mGlide.load(R.drawable.error_image).into(mImageView);
mGlide.load(R.mipmap.ic_launcher_round).into(mImageView);
} else {
mLinearLayout.setVisibility(View.GONE);
mRecyclerView.setVisibility(View.VISIBLE);

View File

@ -382,7 +382,7 @@ public class CommentsListingFragment extends Fragment implements FragmentCommuni
mSwipeRefreshLayout.setRefreshing(false);
mFetchCommentInfoLinearLayout.setVisibility(View.VISIBLE);
mFetchCommentInfoTextView.setText(stringResId);
mGlide.load(R.drawable.error_image).into(mFetchCommentInfoImageView);
mGlide.load(R.mipmap.ic_launcher_round).into(mFetchCommentInfoImageView);
}
}

View File

@ -29,7 +29,6 @@ import javax.inject.Named;
import butterknife.BindView;
import butterknife.ButterKnife;
import me.zhanghai.android.fastscroll.FastScrollerBuilder;
import eu.toldi.infinityforlemmy.FragmentCommunicator;
import eu.toldi.infinityforlemmy.Infinity;
import eu.toldi.infinityforlemmy.R;
@ -41,6 +40,7 @@ import eu.toldi.infinityforlemmy.customtheme.CustomThemeWrapper;
import eu.toldi.infinityforlemmy.customviews.LinearLayoutManagerBugFixed;
import eu.toldi.infinityforlemmy.subscribeduser.SubscribedUserViewModel;
import eu.toldi.infinityforlemmy.utils.SharedPreferencesUtils;
import me.zhanghai.android.fastscroll.FastScrollerBuilder;
import retrofit2.Retrofit;
@ -128,7 +128,7 @@ public class FollowedUsersListingFragment extends Fragment implements FragmentCo
if (subscribedUserData == null || subscribedUserData.size() == 0) {
mRecyclerView.setVisibility(View.GONE);
mLinearLayout.setVisibility(View.VISIBLE);
mGlide.load(R.drawable.error_image).into(mImageView);
mGlide.load(R.mipmap.ic_launcher_round).into(mImageView);
} else {
mLinearLayout.setVisibility(View.GONE);
mRecyclerView.setVisibility(View.VISIBLE);

View File

@ -171,7 +171,7 @@ public class InboxFragment extends Fragment implements FragmentCommunicator {
mSwipeRefreshLayout.setRefreshing(false);
mFetchMessageInfoLinearLayout.setVisibility(View.VISIBLE);
mFetchMessageInfoTextView.setText(stringResId);
mGlide.load(R.drawable.error_image).into(mFetchMessageInfoImageView);
mGlide.load(R.mipmap.ic_launcher_round).into(mFetchMessageInfoImageView);
}
@Override

View File

@ -164,7 +164,7 @@ public class MultiRedditListingFragment extends Fragment implements FragmentComm
if (subscribedUserData == null || subscribedUserData.size() == 0) {
mRecyclerView.setVisibility(View.GONE);
mErrorLinearLayout.setVisibility(View.VISIBLE);
mGlide.load(R.drawable.error_image).into(mErrorImageView);
mGlide.load(R.mipmap.ic_launcher_round).into(mErrorImageView);
} else {
mErrorLinearLayout.setVisibility(View.GONE);
mRecyclerView.setVisibility(View.VISIBLE);

View File

@ -1499,7 +1499,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
mSwipeRefreshLayout.setRefreshing(false);
mFetchPostInfoLinearLayout.setVisibility(View.VISIBLE);
mFetchPostInfoTextView.setText(stringResId);
mGlide.load(R.drawable.error_image).into(mFetchPostInfoImageView);
mGlide.load(R.mipmap.ic_launcher_round).into(mFetchPostInfoImageView);
}
}

View File

@ -162,7 +162,7 @@ public class PrivateMessageFragment extends Fragment implements FragmentCommunic
mSwipeRefreshLayout.setRefreshing(false);
mFetchMessageInfoLinearLayout.setVisibility(View.VISIBLE);
mFetchMessageInfoTextView.setText(stringResId);
mGlide.load(R.drawable.error_image).into(mFetchMessageInfoImageView);
mGlide.load(R.mipmap.ic_launcher_round).into(mFetchMessageInfoImageView);
}
@Override

View File

@ -234,7 +234,7 @@ public class SubredditListingFragment extends Fragment implements FragmentCommun
mSwipeRefreshLayout.setRefreshing(false);
mFetchSubredditListingInfoLinearLayout.setVisibility(View.VISIBLE);
mFetchSubredditListingInfoTextView.setText(stringResId);
Glide.with(this).load(R.drawable.error_image).into(mFetchSubredditListingInfoImageView);
Glide.with(this).load(R.mipmap.ic_launcher_round).into(mFetchSubredditListingInfoImageView);
}
}

View File

@ -144,7 +144,7 @@ public class SubscribedSubredditsListingFragment extends Fragment implements Fra
if (subscribedSubredditData == null || subscribedSubredditData.size() == 0) {
mRecyclerView.setVisibility(View.GONE);
mLinearLayout.setVisibility(View.VISIBLE);
mGlide.load(R.drawable.error_image).into(mImageView);
mGlide.load(R.mipmap.ic_launcher_round).into(mImageView);
} else {
mLinearLayout.setVisibility(View.GONE);
mRecyclerView.setVisibility(View.VISIBLE);

View File

@ -237,7 +237,7 @@ public class UserListingFragment extends Fragment implements FragmentCommunicato
mSwipeRefreshLayout.setRefreshing(false);
mFetchUserListingInfoLinearLayout.setVisibility(View.VISIBLE);
mFetchUserListingInfoTextView.setText(stringResId);
Glide.with(this).load(R.drawable.error_image).into(mFetchUserListingInfoImageView);
Glide.with(this).load(R.mipmap.ic_launcher_round).into(mFetchUserListingInfoImageView);
}
}

View File

@ -1595,7 +1595,7 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic
mFetchPostInfoLinearLayout.setVisibility(View.VISIBLE);
mFetchPostInfoLinearLayout.setOnClickListener(view -> fetchPostAndCommentsById(subredditId));
mFetchPostInfoTextView.setText(R.string.load_post_error);
mGlide.load(R.drawable.error_image).into(mFetchPostInfoImageView);
mGlide.load(R.mipmap.ic_launcher_round).into(mFetchPostInfoImageView);
}
private void showMessage(int resId) {

View File

@ -117,7 +117,6 @@
<string name="no_users">No users found</string>
<string name="no_multi_reddits">No Multicommunities found</string>
<string name="no_storage_permission">No storage permission to save this file</string>
<string name="anonymous_homepage_not_implemented">Anonymous homepage is not implemented yet</string>
<string name="load_comments_failed">Error loading comments.\nTap to retry.</string>
<string name="retry">Retry</string>
<string name="no_comments_yet">No comments yet. Write a comment?</string>