Skip to content

Commit b30df8b

Browse files
committed
realm [nfc]: Add Duration getters for durations
1 parent 45accee commit b30df8b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/model/realm.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,19 @@ import 'store.dart';
1212
/// * [RealmStoreImpl] for the implementation of this that does the work.
1313
/// * [HasRealmStore] for an implementation useful for other substores.
1414
mixin RealmStore on PerAccountStoreBase {
15+
Duration get serverPresencePingInterval => Duration(seconds: serverPresencePingIntervalSeconds);
1516
int get serverPresencePingIntervalSeconds;
17+
Duration get serverPresenceOfflineThreshold => Duration(seconds: serverPresenceOfflineThresholdSeconds);
1618
int get serverPresenceOfflineThresholdSeconds;
1719

1820
RealmWildcardMentionPolicy get realmWildcardMentionPolicy;
1921
bool get realmMandatoryTopics;
2022
/// For docs, please see [InitialSnapshot.realmWaitingPeriodThreshold].
2123
int get realmWaitingPeriodThreshold;
2224
bool get realmAllowMessageEditing;
25+
Duration? get realmMessageContentEditLimit =>
26+
realmMessageContentEditLimitSeconds == null ? null
27+
: Duration(seconds: realmMessageContentEditLimitSeconds!);
2328
int? get realmMessageContentEditLimitSeconds;
2429
bool get realmPresenceDisabled;
2530
int get maxFileUploadSizeMib;

0 commit comments

Comments
 (0)