[FIX] In some discussions you haven't joined yet, messages are not being loaded. (#4269)
* fix discussions not loadings * Adds one more layer of verification to get the correct room type
This commit is contained in:
parent
fa90e4d456
commit
6b15ace933
|
@ -899,13 +899,15 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
|
||||||
};
|
};
|
||||||
|
|
||||||
onDiscussionPress = debounce(
|
onDiscussionPress = debounce(
|
||||||
(item: TAnyMessageModel) => {
|
async (item: TAnyMessageModel) => {
|
||||||
const { navigation } = this.props;
|
const { navigation } = this.props;
|
||||||
|
if (!item.drid) return;
|
||||||
|
const sub = await getRoomInfo(item.drid);
|
||||||
navigation.push('RoomView', {
|
navigation.push('RoomView', {
|
||||||
rid: item.drid as string,
|
rid: item.drid as string,
|
||||||
prid: item.rid,
|
prid: item?.subscription?.id,
|
||||||
name: item.msg,
|
name: item.msg,
|
||||||
t: 'p' as SubscriptionType
|
t: (sub?.t as SubscriptionType) || (this.t as SubscriptionType)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
1000,
|
1000,
|
||||||
|
|
Loading…
Reference in New Issue