Merge pull request #898 from lbryio/user-bugs

fix reported bugs from 0.15.3
This commit is contained in:
Akinwale Ariwodola 2020-05-26 16:09:51 +01:00 committed by GitHub
commit 4c50ffac19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 3 deletions

View file

@ -335,7 +335,10 @@ public class ClaimListAdapter extends RecyclerView.Adapter<ClaimListAdapter.View
@Override @Override
public void onClick(View view) { public void onClick(View view) {
if (isPending) { 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; return;
} }
@ -356,7 +359,10 @@ public class ClaimListAdapter extends RecyclerView.Adapter<ClaimListAdapter.View
} }
if (isPending) { 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; return false;
} }

View file

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

View file

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