mirror of https://github.com/readrops/Readrops.git
Disable select all contextual menu item when current account is FreshRSS
This commit is contained in:
parent
5eb4353f8a
commit
46d4d8a868
|
@ -308,6 +308,8 @@ public class MainActivity extends AppCompatActivity implements SwipeRefreshLayou
|
|||
public boolean onPrepareActionMode(ActionMode actionMode, Menu menu) {
|
||||
menu.findItem(R.id.item_mark_read).setVisible(!itemWithFeed.getItem().isRead());
|
||||
menu.findItem(R.id.item_mark_unread).setVisible(itemWithFeed.getItem().isRead());
|
||||
menu.findItem(R.id.item_select_all).setVisible(!(viewModel.getCurrentAccount()
|
||||
.is(Account.AccountType.FRESHRSS)));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -256,6 +256,10 @@ public class Account implements Parcelable {
|
|||
return accountType == AccountType.LOCAL;
|
||||
}
|
||||
|
||||
public boolean is(AccountType accountType) {
|
||||
return this.accountType == accountType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object obj) {
|
||||
if (obj == null)
|
||||
|
|
|
@ -99,7 +99,7 @@ public class EditFeedDialog extends DialogFragment implements AdapterView.OnItem
|
|||
folder = v.findViewById(R.id.edit_feed_folder_spinner);
|
||||
|
||||
//TODO : this is temporary and should be changed when other service APIs are implemented
|
||||
if (account.getAccountType() == Account.AccountType.NEXTCLOUD_NEWS)
|
||||
if (account.is(Account.AccountType.NEXTCLOUD_NEWS))
|
||||
feedUrl.setEnabled(false);
|
||||
|
||||
feedName.setText(feedWithFolder.getFeed().getName());
|
||||
|
|
Loading…
Reference in New Issue