File tree 2 files changed +2
-11
lines changed
2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -110,10 +110,7 @@ export default class ChatStateStore implements DispatchListener {
110
110
}
111
111
112
112
runInAction ( ( ) => {
113
- // TODO: use selectChannel?
114
- if ( typeof this . selected === 'number' ) {
115
- this . channelStore . loadChannel ( this . selected ) ;
116
- }
113
+ this . selectedChannel ?. load ( ) ;
117
114
118
115
this . isReady = true ;
119
116
} ) ;
@@ -207,7 +204,7 @@ export default class ChatStateStore implements DispatchListener {
207
204
this . refocusToIndex = this . channelList . indexOf ( channel ) ;
208
205
209
206
// TODO: should this be here or have something else figure out if channel needs to be loaded?
210
- this . channelStore . loadChannel ( channelId ) ;
207
+ channel . load ( ) ;
211
208
212
209
this . updateUrl ( channel , mode ) ;
213
210
}
Original file line number Diff line number Diff line change @@ -125,12 +125,6 @@ export default class ChannelStore implements DispatchListener {
125
125
}
126
126
}
127
127
128
- // TODO: load is async, needs to be reflected somewhere.
129
- @action
130
- loadChannel ( channelId : number ) {
131
- this . channels . get ( channelId ) ?. load ( ) ;
132
- }
133
-
134
128
@action
135
129
loadChannelEarlierMessages ( channelId : number ) {
136
130
this . get ( channelId ) ?. loadEarlierMessages ( ) ;
You can’t perform that action at this time.
0 commit comments