diff --git a/app/queries/servers/post.ts b/app/queries/servers/post.ts index 38e52b2b7..d504bd079 100644 --- a/app/queries/servers/post.ts +++ b/app/queries/servers/post.ts @@ -9,7 +9,7 @@ import {MM_TABLES} from '@constants/database'; import {queryGroupsByNames} from './group'; import {querySavedPostsPreferences} from './preference'; -import {getConfigValue, observeConfigBooleanValue} from './system'; +import {getConfigValue, observeConfigBooleanValue, observeConfigIntValue, observeConfigValue} from './system'; import {queryUsersByUsername, observeUser, observeCurrentUser} from './user'; import type PostModel from '@typings/database/models/servers/post'; diff --git a/app/screens/post_priority_picker/index.ts b/app/screens/post_priority_picker/index.ts index 810b2e061..3fe86ba5b 100644 --- a/app/screens/post_priority_picker/index.ts +++ b/app/screens/post_priority_picker/index.ts @@ -6,14 +6,19 @@ import withObservables from '@nozbe/with-observables'; import {observeIsPostAcknowledgementsEnabled, observePersistentNotificationsEnabled} from '@queries/servers/post'; +import {observeConfigIntValue} from '../../queries/servers/system'; + import PostPriorityPicker from './post_priority_picker'; import type {Database} from '@nozbe/watermelondb'; const enhanced = withObservables([], ({database}: {database: Database}) => { + const persistentNotificationInterval = observeConfigIntValue(database, 'PersistentNotificationIntervalMinutes'); + return { isPostAcknowledgementEnabled: observeIsPostAcknowledgementsEnabled(database), isPersistenNotificationsEnabled: observePersistentNotificationsEnabled(database), + persistentNotificationInterval, }; }); diff --git a/app/screens/post_priority_picker/post_priority_picker.tsx b/app/screens/post_priority_picker/post_priority_picker.tsx index 01a8d065f..65e197938 100644 --- a/app/screens/post_priority_picker/post_priority_picker.tsx +++ b/app/screens/post_priority_picker/post_priority_picker.tsx @@ -35,6 +35,7 @@ type Props = { postPriority: PostPriority; updatePostPriority: (data: PostPriority) => void; closeButtonId: string; + persistentNotificationInterval: number; }; const TITLE_HEIGHT = 30; // typography 600 line height @@ -83,6 +84,7 @@ const PostPriorityPicker = ({ componentId, isPostAcknowledgementEnabled, isPersistenNotificationsEnabled, + persistentNotificationInterval, postPriority, updatePostPriority, closeButtonId, @@ -201,7 +203,12 @@ const PostPriorityPicker = ({