Wellbeing mode (#1992)
* Add wellbeing mode settings toggle * Translate wellbeing mode string to german * Disable fav/boost count on toots if wellbeing is enabled * Hide follow/post stats on profiles * Reload notifications when wellbeing mode is toggled * Add wellbeing mode explainer dialog * Move wellbeing filter timeline into own category * Add toggles for quantitative stats * Hide announcement badge counts if wellbeing is enabled * Move fetching of wellbeing setting to activity * Add wellbeing option to statusDisplayOptions * Update post filters for all accounts * Remove local translations * Revert "Remove local translations" This reverts commit e92e636a5c759b09649174ab68ec91bc13680287. * Remove german translations
This commit is contained in:
parent
05233de0f9
commit
0fbb4e9713
21 changed files with 164 additions and 29 deletions
|
|
@ -71,6 +71,7 @@ import com.keylesspalace.tusky.interfaces.AccountActionListener;
|
|||
import com.keylesspalace.tusky.interfaces.ActionButtonActivity;
|
||||
import com.keylesspalace.tusky.interfaces.ReselectableFragment;
|
||||
import com.keylesspalace.tusky.interfaces.StatusActionListener;
|
||||
import com.keylesspalace.tusky.settings.PrefKeys;
|
||||
import com.keylesspalace.tusky.util.CardViewMode;
|
||||
import com.keylesspalace.tusky.util.Either;
|
||||
import com.keylesspalace.tusky.util.HttpHeaderLink;
|
||||
|
|
@ -251,7 +252,8 @@ public class NotificationsFragment extends SFragment implements
|
|||
preferences.getBoolean("showBotOverlay", true),
|
||||
preferences.getBoolean("useBlurhash", true),
|
||||
CardViewMode.NONE,
|
||||
preferences.getBoolean("confirmReblogs", true)
|
||||
preferences.getBoolean("confirmReblogs", true),
|
||||
preferences.getBoolean(PrefKeys.WELLBEING_HIDE_STATS_POSTS, false)
|
||||
);
|
||||
|
||||
adapter = new NotificationsAdapter(accountManager.getActiveAccount().getAccountId(),
|
||||
|
|
@ -801,6 +803,7 @@ public class NotificationsFragment extends SFragment implements
|
|||
private void loadNotificationsFilter() {
|
||||
AccountEntity account = accountManager.getActiveAccount();
|
||||
if (account != null) {
|
||||
notificationFilter.clear();
|
||||
notificationFilter.addAll(NotificationTypeConverterKt.deserialize(
|
||||
account.getNotificationsFilter()));
|
||||
}
|
||||
|
|
@ -1277,6 +1280,12 @@ public class NotificationsFragment extends SFragment implements
|
|||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
String rawAccountNotificationFilter = accountManager.getActiveAccount().getNotificationsFilter();
|
||||
Set<Notification.Type> accountNotificationFilter = NotificationTypeConverterKt.deserialize(rawAccountNotificationFilter);
|
||||
if (!notificationFilter.equals(accountNotificationFilter)) {
|
||||
loadNotificationsFilter();
|
||||
fullyRefreshWithProgressBar(true);
|
||||
}
|
||||
startUpdateTimestamp();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue