mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-15 19:50:28 +03:00
Fix app stuck on welcome screen in small device
This commit is contained in:
parent
74216f75e2
commit
53f1129242
7 changed files with 16 additions and 31 deletions
|
|
@ -5,7 +5,7 @@ import './InviteList.scss';
|
|||
import initMatrix from '../../../client/initMatrix';
|
||||
import cons from '../../../client/state/cons';
|
||||
import * as roomActions from '../../../client/action/room';
|
||||
import { selectRoom, selectTab, openNavigation } from '../../../client/action/navigation';
|
||||
import { selectRoom, selectTab } from '../../../client/action/navigation';
|
||||
|
||||
import Text from '../../atoms/text/Text';
|
||||
import Button from '../../atoms/button/Button';
|
||||
|
|
@ -28,7 +28,6 @@ function InviteList({ isOpen, onRequestClose }) {
|
|||
procInvite.add(roomId);
|
||||
changeProcInvite(new Set(Array.from(procInvite)));
|
||||
roomActions.leave(roomId, isDM);
|
||||
openNavigation();
|
||||
}
|
||||
function updateInviteList(roomId) {
|
||||
if (procInvite.has(roomId)) procInvite.delete(roomId);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import cons from '../../../client/state/cons';
|
|||
import settings from '../../../client/state/settings';
|
||||
import RoomTimeline from '../../../client/state/RoomTimeline';
|
||||
import navigation from '../../../client/state/navigation';
|
||||
import { openNavigation } from '../../../client/action/navigation';
|
||||
|
||||
import Welcome from '../welcome/Welcome';
|
||||
import RoomView from './RoomView';
|
||||
|
|
@ -53,7 +54,10 @@ function Room() {
|
|||
}, []);
|
||||
|
||||
const { roomTimeline, eventId } = roomInfo;
|
||||
if (roomTimeline === null) return <Welcome />;
|
||||
if (roomTimeline === null) {
|
||||
setTimeout(() => openNavigation());
|
||||
return <Welcome />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="room">
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { blurOnBubbling } from '../../atoms/button/script';
|
|||
import initMatrix from '../../../client/initMatrix';
|
||||
import cons from '../../../client/state/cons';
|
||||
import navigation from '../../../client/state/navigation';
|
||||
import { openInviteUser, toggleRoomSettings, openNavigation } from '../../../client/action/navigation';
|
||||
import { openInviteUser, toggleRoomSettings } from '../../../client/action/navigation';
|
||||
import * as roomActions from '../../../client/action/room';
|
||||
|
||||
import Text from '../../atoms/text/Text';
|
||||
|
|
@ -88,7 +88,6 @@ function GeneralSettings({ roomId }) {
|
|||
onClick={() => {
|
||||
if (confirm('Are you sure that you want to leave this room?')) {
|
||||
roomActions.leave(roomId);
|
||||
openNavigation();
|
||||
}
|
||||
}}
|
||||
iconSrc={LeaveArrowIC}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import {
|
|||
openCreateRoom,
|
||||
openPublicRooms,
|
||||
openInviteUser,
|
||||
openNavigation,
|
||||
} from '../../../client/action/navigation';
|
||||
import { getEmojiForCompletion } from '../emoji-board/custom-emoji';
|
||||
import AsyncSearch from '../../../util/AsyncSearch';
|
||||
|
|
@ -47,7 +46,6 @@ const commands = [{
|
|||
description: 'Leave current room',
|
||||
exe: (roomId) => {
|
||||
roomActions.leave(roomId);
|
||||
openNavigation();
|
||||
},
|
||||
}, {
|
||||
name: 'invite',
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import './RoomViewHeader.scss';
|
||||
|
||||
|
|
@ -8,7 +8,7 @@ import { blurOnBubbling } from '../../atoms/button/script';
|
|||
import initMatrix from '../../../client/initMatrix';
|
||||
import cons from '../../../client/state/cons';
|
||||
import navigation from '../../../client/state/navigation';
|
||||
import { toggleRoomSettings, openReusableContextMenu } from '../../../client/action/navigation';
|
||||
import { toggleRoomSettings, openReusableContextMenu, openNavigation } from '../../../client/action/navigation';
|
||||
import { togglePeopleDrawer } from '../../../client/action/settings';
|
||||
import colorMXID from '../../../util/colorMXID';
|
||||
import { getEventCords } from '../../../util/common';
|
||||
|
|
@ -78,7 +78,7 @@ function RoomViewHeader({ roomId }) {
|
|||
src={BackArrowIC}
|
||||
className="room-header__back-btn"
|
||||
tooltip="Return to navigation"
|
||||
onClick={() => navigation.emit(cons.events.navigation.NAVIGATION_OPENED)}
|
||||
onClick={() => openNavigation()}
|
||||
/>
|
||||
<button
|
||||
ref={roomHeaderBtnRef}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue