mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 00:08:46 +00:00
[Glitch] Add ability for admins to force grouped notifications in web UI
Port c73868cd78 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import { debounce } from 'lodash';
|
||||
|
||||
import type { MarkerJSON } from 'flavours/glitch/api_types/markers';
|
||||
import { getAccessToken } from 'flavours/glitch/initial_state';
|
||||
import { selectUseGroupedNotifications } from 'flavours/glitch/selectors/settings';
|
||||
import type { AppDispatch, RootState } from 'flavours/glitch/store';
|
||||
import { createAppAsyncThunk } from 'flavours/glitch/store/typed_functions';
|
||||
|
||||
@@ -75,13 +76,8 @@ interface MarkerParam {
|
||||
}
|
||||
|
||||
function getLastNotificationId(state: RootState): string | undefined {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
||||
const enableBeta = state.settings.getIn(
|
||||
['notifications', 'groupingBeta'],
|
||||
false,
|
||||
) as boolean;
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||
return enableBeta
|
||||
return selectUseGroupedNotifications(state)
|
||||
? state.notificationGroups.lastReadId
|
||||
: // @ts-expect-error state.notifications is not yet typed
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||
|
||||
Reference in New Issue
Block a user