fix: Mobile style fixes and other small ui fixes
This commit is contained in:
@@ -42,13 +42,13 @@ function getDefaultTextChannelId(room: Room): string {
|
||||
return resolveActiveTextChannelId(enrichRoom(room).channels, 'general');
|
||||
}
|
||||
|
||||
function activateRoomView(state: RoomsState, room: Room, isConnecting: boolean): RoomsState {
|
||||
function activateRoomView(state: RoomsState, room: Room, isConnecting: boolean, updateSavedRooms = true): RoomsState {
|
||||
const enriched = enrichRoom(room);
|
||||
|
||||
return {
|
||||
...state,
|
||||
currentRoom: enriched,
|
||||
savedRooms: upsertRoom(state.savedRooms, enriched),
|
||||
savedRooms: updateSavedRooms ? upsertRoom(state.savedRooms, enriched) : state.savedRooms,
|
||||
isConnecting,
|
||||
signalServerCompatibilityError: null,
|
||||
isConnected: true,
|
||||
@@ -237,7 +237,7 @@ export const roomsReducer = createReducer(
|
||||
on(RoomsActions.viewServer, (state, { room, skipBanCheck }) => {
|
||||
if (skipBanCheck) {
|
||||
return {
|
||||
...activateRoomView(state, room, true),
|
||||
...activateRoomView(state, room, true, false),
|
||||
error: null
|
||||
};
|
||||
}
|
||||
@@ -250,7 +250,7 @@ export const roomsReducer = createReducer(
|
||||
};
|
||||
}),
|
||||
|
||||
on(RoomsActions.viewServerSuccess, (state, { room }) => activateRoomView(state, room, false)),
|
||||
on(RoomsActions.viewServerSuccess, (state, { room }) => activateRoomView(state, room, false, false)),
|
||||
|
||||
// Update room settings
|
||||
on(RoomsActions.updateRoomSettings, (state) => ({
|
||||
|
||||
Reference in New Issue
Block a user