fix reported bugs from 0.15.3

This commit is contained in:
Akinwale Ariwodola 2020-05-26 16:09:14 +01:00
parent 0380e35966
commit 551e736651
3 changed files with 17 additions and 3 deletions

View file

@ -335,7 +335,10 @@ public class ClaimListAdapter extends RecyclerView.Adapter<ClaimListAdapter.View
@Override
public void onClick(View view) {
if (isPending) {
Snackbar.make(vh.itemView, R.string.item_pending_blockchain, Snackbar.LENGTH_LONG).show();
Snackbar snackbar = Snackbar.make(vh.itemView, R.string.item_pending_blockchain, Snackbar.LENGTH_LONG);
TextView snackbarText = snackbar.getView().findViewById(com.google.android.material.R.id.snackbar_text);
snackbarText.setMaxLines(5);
snackbar.show();
return;
}
@ -356,7 +359,10 @@ public class ClaimListAdapter extends RecyclerView.Adapter<ClaimListAdapter.View
}
if (isPending) {
Snackbar.make(vh.itemView, R.string.item_pending_blockchain, Snackbar.LENGTH_LONG).show();
Snackbar snackbar = Snackbar.make(vh.itemView, R.string.item_pending_blockchain, Snackbar.LENGTH_LONG);
TextView snackbarText = snackbar.getView().findViewById(com.google.android.material.R.id.snackbar_text);
snackbarText.setMaxLines(5);
snackbar.show();
return false;
}

View file

@ -248,6 +248,8 @@ public class FollowingFragment extends BaseFragment implements
discoverLink.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Helper.setViewEnabled(discoverLink, false);
buildChannelIdsAndUrls();
currentSuggestedPage = 1;
discoverDialog = DiscoverDialogFragment.newInstance();
@ -268,6 +270,7 @@ public class FollowingFragment extends BaseFragment implements
if (suggestedChannelAdapter != null) {
suggestedChannelAdapter.clearItems();
}
Helper.setViewEnabled(discoverLink, true);
}
@Override
public void onResume() {

View file

@ -159,7 +159,12 @@ public class PublishesFragment extends BaseFragment implements ActionMode.Callba
@Override
public void onClaimClicked(Claim claim) {
if (context instanceof MainActivity) {
((MainActivity) context).openFileClaim(claim);
MainActivity activity = (MainActivity) context;
if (claim.getName().startsWith("@")) {
activity.openChannelClaim(claim);
} else {
activity.openFileClaim(claim);
}
}
}
});