-
+
+
+
+
+
+
+ {
+ setMobileViewModeKeepOpen('')
+ }}
+ >
+
+
+
+
+
+ )}
+
{directs.map((direct: any) => (
-
+
@@ -1614,7 +1662,7 @@ export const Group = ({
sx={{
display: "flex",
width: "100%",
- alignItems: 'center'
+ alignItems: "center",
}}
>
@@ -1670,7 +1718,7 @@ export const Group = ({
))}
-
+
-
- {
- setNewChat(true);
- setSelectedDirect(null);
- // setSelectedGroup(null);
- setIsOpenDrawer(false);
+ {
+ setNewChat(true);
+ setSelectedDirect(null);
+ // setSelectedGroup(null);
+ setIsOpenDrawer(false);
+ }}
+ >
+
-
- New Chat
-
-
+ />
+ New Chat
+
- )
- }
+ );
+ };
const renderGroups = () => {
return (
{!isMobile && renderGroups()}
-
-
+
+
- {mobileViewMode === 'groups' && (
- renderGroups()
- )}
+ {mobileViewMode === "groups" && !mobileViewModeKeepOpen && renderGroups()}
-{mobileViewModeKeepOpen === 'messaging' && (
- renderDirects()
- )}
- {newChat && (
- <>
-
- {
- setSelectedDirect(null);
-
- setNewChat(false);
- }}
- />
-
- >
- )}
- {selectedGroup && (
- <>
- {mobileViewMode === 'group' && (
-
- )}
-
- {triedToFetchSecretKey && (
-
- )}
- {firstSecretKeyInCreation &&
- triedToFetchSecretKey &&
- !secretKeyPublishDate && (
-
+
+
+
- {" "}
-
- The group's first common encryption key is in the process
- of creation. Please wait a few minutes for it to be
- retrieved by the network. Checking every 2 minutes...
-
-
- )}
- {!admins.includes(myAddress) &&
- !secretKey &&
- triedToFetchSecretKey ? (
+ {
+ close()
+ }}
+ >
+
+
+
+
+
+ {
+ setSelectedDirect(null)
+ setMobileViewModeKeepOpen('')
+ }}
+ >
+
+
+
+
+
+
+ {
+ setSelectedDirect(null);
+
+ setNewChat(false);
+ }}
+ setMobileViewModeKeepOpen={setMobileViewModeKeepOpen}
+ />
+
+ >
+ )}
+ {selectedGroup && (
+ <>
+
+
+
+ {
+ setMobileViewMode("groups");
+ }}
+ >
+
+
+
+
+ {selectedGroup?.groupName}
+
+
+ {/* */}
+
+
+
+ {mobileViewMode === "group" && (
<>
- {secretKeyPublishDate ||
- (!secretKeyPublishDate && !firstSecretKeyInCreation) ? (
+
+ >
+ )}
+
+ {triedToFetchSecretKey && (
+
+ )}
+ {firstSecretKeyInCreation &&
+ triedToFetchSecretKey &&
+ !secretKeyPublishDate && (
{" "}
- You are not part of the encrypted group of members. Wait
- until an admin re-encrypts the keys.
+ The group's first common encryption key is in the
+ process of creation. Please wait a few minutes for it to
+ be retrieved by the network. Checking every 2 minutes...
-
-
- Try notifying an admin from the list of admins below:
-
-
- {adminsWithNames.map((admin) => {
- return (
-
- {admin?.name}
- notifyAdmin(admin)}
- >
- Notify
-
-
- );
- })}
- ) : null}
- >
- ) : admins.includes(myAddress) &&
+ )}
+ {!admins.includes(myAddress) &&
!secretKey &&
- triedToFetchSecretKey ? null : !triedToFetchSecretKey ? null : (
- <>
-
-
- >
- )}
+ triedToFetchSecretKey ? (
+ <>
+ {secretKeyPublishDate ||
+ (!secretKeyPublishDate && !firstSecretKeyInCreation) ? (
+
+ {" "}
+
+ You are not part of the encrypted group of members.
+ Wait until an admin re-encrypts the keys.
+
+
+
+ Try notifying an admin from the list of admins below:
+
+
+ {adminsWithNames.map((admin) => {
+ return (
+
+ {admin?.name}
+ notifyAdmin(admin)}
+ >
+ Notify
+
+
+ );
+ })}
+
+ ) : null}
+ >
+ ) : admins.includes(myAddress) &&
+ !secretKey &&
+ triedToFetchSecretKey ? null : !triedToFetchSecretKey ? null : (
+ <>
+
+
+ >
+ )}
+
+ {admins.includes(myAddress) &&
+ shouldReEncrypt &&
+ triedToFetchSecretKey &&
+ !firstSecretKeyInCreation &&
+ !hideCommonKeyPopup && (
+
+ )}
+
+
+ {openManageMembers && (
+
+ )}
+ >
+ )}
+
+ {selectedDirect && !newChat && (
+ <>
- {admins.includes(myAddress) &&
- shouldReEncrypt &&
- triedToFetchSecretKey &&
- !firstSecretKeyInCreation && !hideCommonKeyPopup && (
-
- )}
+
+ {
+ setSelectedDirect(null);
+
+ setNewChat(false);
+ }}
+ setMobileViewModeKeepOpen={setMobileViewModeKeepOpen}
+ />
+
-
- {openManageMembers && (
-
- )}
- >
- )}
+ >
+ )}
- {selectedDirect && !newChat && (
- <>
-
-
-
-
-
-
- {
- setSelectedDirect(null);
-
- setNewChat(false);
- }}
- />
-
-
- >
- )}
-
- {mobileViewMode === 'home' && (
-
- )}
- {/* {
+ {mobileViewMode === "home" && (
+
+ )}
+ {/* {
!selectedGroup &&
groupSection === "home" && (
@@ -2414,7 +2591,7 @@ export const Group = ({
setOpenAddGroup={setOpenAddGroup}
/>
)} */}
-
+
{
setGroupSection("forum");
setSelectedDirect(null);
- setNewChat(false)
+ setNewChat(false);
}}
>
@@ -2617,36 +2795,53 @@ export const Group = ({
message: "Setting up groups... please wait.",
}}
/>
-
- {mobileViewMode === 'home' && !mobileViewModeKeepOpen && (
+ {mobileViewMode === "home" && !mobileViewModeKeepOpen && (
<>
-