fix more crash bugs reported in Play Store
This commit is contained in:
parent
34ea4f216c
commit
e473981063
3 changed files with 20 additions and 14 deletions
|
@ -45,6 +45,7 @@ public class UpdateSuggestedTagsTask extends AsyncTask<Void, Void, List<Tag>> {
|
|||
if (suggestedTagsAdapter != null && !clearPrevious) {
|
||||
tags = new ArrayList<>(suggestedTagsAdapter.getTags());
|
||||
}
|
||||
if (Lbry.knownTags.size() > 0) {
|
||||
while (tags.size() < limit) {
|
||||
Tag randomTag = Lbry.knownTags.get(random.nextInt(Lbry.knownTags.size()));
|
||||
if (excludeMature && randomTag.isMature()) {
|
||||
|
@ -54,6 +55,7 @@ public class UpdateSuggestedTagsTask extends AsyncTask<Void, Void, List<Tag>> {
|
|||
tags.add(randomTag);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Tag filterTag = new Tag(filter);
|
||||
if (addedTagsAdapter == null || !addedTagsAdapter.getTags().contains(filterTag)) {
|
||||
|
|
|
@ -91,7 +91,11 @@ public class LoadSharedUserStateTask extends AsyncTask<Void, Void, Boolean> {
|
|||
|
||||
if (tags != null) {
|
||||
if (db != null && tags.length() > 0) {
|
||||
try {
|
||||
DatabaseHelper.setAllTagsUnfollowed(db);
|
||||
} catch (IllegalStateException ex) {
|
||||
// pass
|
||||
}
|
||||
}
|
||||
|
||||
followedTags = new ArrayList<>();
|
||||
|
|
|
@ -443,16 +443,16 @@ public class ChannelFragment extends BaseFragment implements FetchChannelsListen
|
|||
if (tabPager.getAdapter() == null && context instanceof MainActivity) {
|
||||
tabPager.setAdapter(new ChannelPagerAdapter(claim, (MainActivity) context));
|
||||
}
|
||||
} catch (IllegalStateException ex) {
|
||||
// TODO: Fix why this is happening
|
||||
// pass
|
||||
}
|
||||
new TabLayoutMediator(tabLayout, tabPager, new TabLayoutMediator.TabConfigurationStrategy() {
|
||||
@Override
|
||||
public void onConfigureTab(@NonNull TabLayout.Tab tab, int position) {
|
||||
tab.setText(position == 0 ? R.string.content : R.string.about);
|
||||
}
|
||||
}).attach();
|
||||
} catch (IllegalStateException ex) {
|
||||
// TODO: Fix why this is happening
|
||||
// pass
|
||||
}
|
||||
}
|
||||
|
||||
private void resetSubCount() {
|
||||
|
|
Loading…
Reference in a new issue