File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,15 @@ import '../api/model/model.dart';
11
11
import '../api/route/messages.dart' ;
12
12
import '../log.dart' ;
13
13
import 'binding.dart' ;
14
+ import 'channel.dart' ;
14
15
import 'message_list.dart' ;
15
16
import 'realm.dart' ;
16
17
import 'store.dart' ;
17
18
18
19
const _apiSendMessage = sendMessage; // Bit ugly; for alternatives, see: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/flutter.3A.20PerAccountStore.20methods/near/1545809
19
20
20
21
/// The portion of [PerAccountStore] for messages and message lists.
21
- mixin MessageStore {
22
+ mixin MessageStore on ChannelStore {
22
23
/// All known messages, indexed by [Message.id] .
23
24
Map <int , Message > get messages;
24
25
@@ -138,8 +139,8 @@ class _EditMessageRequestStatus {
138
139
final String newContent;
139
140
}
140
141
141
- class MessageStoreImpl extends HasRealmStore with MessageStore , _OutboxMessageStore {
142
- MessageStoreImpl ({required super .realm })
142
+ class MessageStoreImpl extends HasChannelStore with MessageStore , _OutboxMessageStore {
143
+ MessageStoreImpl ({required super .channels })
143
144
: // There are no messages in InitialSnapshot, so we don't have
144
145
// a use case for initializing MessageStore with nonempty [messages].
145
146
messages = {};
Original file line number Diff line number Diff line change @@ -537,7 +537,7 @@ class PerAccountStore extends PerAccountStoreBase with
537
537
presence: Presence (realm: realm,
538
538
initial: initialSnapshot.presences),
539
539
channels: channels,
540
- messages: MessageStoreImpl (realm : realm ),
540
+ messages: MessageStoreImpl (channels : channels ),
541
541
unreads: Unreads (core: core, channelStore: channels,
542
542
initial: initialSnapshot.unreadMsgs),
543
543
recentDmConversationsView: RecentDmConversationsView (core: core,
You can’t perform that action at this time.
0 commit comments