This commit is contained in:
Travis Ralston 2021-02-24 18:27:59 -07:00
parent e2fb9b3ae8
commit fbe5d17785

View file

@ -57,9 +57,9 @@ export default class PersistentApp extends React.Component {
});
};
_onMyMembership = async (room) => {
_onMyMembership = async (room, membership) => {
const persistentWidgetInRoomId = ActiveWidgetStore.getRoomId(this.state.persistentWidgetId);
if (room.getMyMembership() !== "join") {
if (membership !== "join") {
// we're not in the room anymore - delete
if (room.roomId === persistentWidgetInRoomId) {
ActiveWidgetStore.destroyPersistentWidget(this.state.persistentWidgetId);