Fix visibility of "Mark as read" button (#975)

### Describe what your pull request does and which issue you’re targeting
<!-- Create a new issue, if it doesn't exist yet -->
Closes #970
<br><br>

<!-- Make sure you are targeting the "main" branch, pull requests on release branches are only allowed for bug fixes. -->

- [X] I carefully read the [contribution guidelines](https://codeberg.org/GitNex/GitNex/src/branch/main/CONTRIBUTING.md).
- [X] I'm following the code standards as defined [here](https://codeberg.org/gitnex/GitNex/wiki/Code-Standards).
- [X] By submitting this pull request, I permit GitNex to license my work under the [GNU General Public License v3](https://codeberg.org/GitNex/GitNex/src/branch/main/LICENSE).

Co-authored-by: qwerty287 <ndev@web.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/975
Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
This commit is contained in:
qwerty287 2021-09-02 08:52:18 +02:00 committed by M M Arif
parent 2659d87bbe
commit 77d1d448ba
1 changed files with 9 additions and 6 deletions

View File

@ -250,13 +250,16 @@ public class NotificationsFragment extends Fragment implements NotificationsAdap
AppUtil.setMultiVisibility(View.GONE, loadingMoreView, progressBar); AppUtil.setMultiVisibility(View.GONE, loadingMoreView, progressBar);
pullToRefresh.setRefreshing(false); pullToRefresh.setRefreshing(false);
if(notificationThreads.isEmpty()) { if(currentFilterMode.equalsIgnoreCase("unread")) {
noDataNotifications.setVisibility(View.VISIBLE); if(notificationThreads.isEmpty()) {
markAllAsRead.setVisibility(View.GONE);
} noDataNotifications.setVisibility(View.VISIBLE);
else { markAllAsRead.setVisibility(View.GONE);
markAllAsRead.setVisibility(View.VISIBLE); }
else {
markAllAsRead.setVisibility(View.VISIBLE);
}
} }
} }
}); });