@@ -110,7 +110,10 @@ class MessageStoreImpl extends PerAccountStoreBase with MessageStore, _OutboxMes
110
110
messages = {};
111
111
112
112
// This copy of the realm setting is here to bypass the feature-level check
113
- // on the usual getter for it. See the one access site of this field.
113
+ // on the usual getter for it. See discussion:
114
+ // https://github.com/zulip/zulip-flutter/pull/1472#discussion_r2099069276
115
+ // TODO move [TopicName.processLikeServer] to a substore, eliminating this
116
+ @override
114
117
final String ? _realmEmptyTopicDisplayName; // TODO(#668): update this realm setting
115
118
116
119
@override
@@ -250,11 +253,7 @@ class MessageStoreImpl extends PerAccountStoreBase with MessageStore, _OutboxMes
250
253
content: content,
251
254
readBySender: true );
252
255
}
253
- return _outboxSendMessage (
254
- destination: destination, content: content,
255
- // TODO move [TopicName.processLikeServer] to a substore, eliminating this
256
- // see https://github.com/zulip/zulip-flutter/pull/1472#discussion_r2099069276
257
- realmEmptyTopicDisplayName: _realmEmptyTopicDisplayName);
256
+ return _outboxSendMessage (destination: destination, content: content);
258
257
}
259
258
260
259
@override
@@ -773,6 +772,8 @@ class DmOutboxMessage extends OutboxMessage<DmConversation> {
773
772
774
773
/// Manages the outbox messages portion of [MessageStore] .
775
774
mixin _OutboxMessageStore on PerAccountStoreBase {
775
+ String ? get _realmEmptyTopicDisplayName;
776
+
776
777
late final UnmodifiableMapView <int , OutboxMessage > outboxMessages =
777
778
UnmodifiableMapView (_outboxMessages);
778
779
final Map <int , OutboxMessage > _outboxMessages = {};
@@ -848,7 +849,6 @@ mixin _OutboxMessageStore on PerAccountStoreBase {
848
849
Future <void > _outboxSendMessage ({
849
850
required MessageDestination destination,
850
851
required String content,
851
- required String ? realmEmptyTopicDisplayName,
852
852
}) async {
853
853
assert (! _disposed);
854
854
final localMessageId = _nextLocalMessageId++ ;
@@ -858,8 +858,7 @@ mixin _OutboxMessageStore on PerAccountStoreBase {
858
858
StreamDestination (: final streamId, : final topic) =>
859
859
StreamConversation (
860
860
streamId,
861
- _processTopicLikeServer (
862
- topic, realmEmptyTopicDisplayName: realmEmptyTopicDisplayName),
861
+ _processTopicLikeServer (topic),
863
862
displayRecipient: null ),
864
863
DmDestination (: final userIds) => DmConversation (allRecipientIds: userIds),
865
864
};
@@ -918,9 +917,7 @@ mixin _OutboxMessageStore on PerAccountStoreBase {
918
917
}
919
918
}
920
919
921
- TopicName _processTopicLikeServer (TopicName topic, {
922
- required String ? realmEmptyTopicDisplayName,
923
- }) {
920
+ TopicName _processTopicLikeServer (TopicName topic) {
924
921
return topic.processLikeServer (
925
922
// Processing this just once on creating the outbox message
926
923
// allows an uncommon bug, because either of these values can change.
@@ -936,7 +933,7 @@ mixin _OutboxMessageStore on PerAccountStoreBase {
936
933
// so that the setting in effect by the time the request arrives
937
934
// is different from the setting the client last heard about.
938
935
zulipFeatureLevel: zulipFeatureLevel,
939
- realmEmptyTopicDisplayName: realmEmptyTopicDisplayName );
936
+ realmEmptyTopicDisplayName: _realmEmptyTopicDisplayName );
940
937
}
941
938
942
939
void _handleOutboxDebounce (int localMessageId) {
0 commit comments