mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-07-23 04:36:52 +00:00
finished apps feature for mobile
This commit is contained in:
@@ -824,98 +824,7 @@ export const Group = ({
|
||||
}
|
||||
}, [selectedGroup]);
|
||||
|
||||
// const handleNotification = async (data)=> {
|
||||
// try {
|
||||
// if(isFocusedRef.current){
|
||||
// throw new Error('isFocused')
|
||||
// }
|
||||
// const newActiveChats= data
|
||||
// const oldActiveChats = await new Promise((res, rej) => {
|
||||
// chrome?.runtime?.sendMessage(
|
||||
// {
|
||||
// action: "getChatHeads",
|
||||
// },
|
||||
// (response) => {
|
||||
// console.log({ response });
|
||||
// if (!response?.error) {
|
||||
// res(response);
|
||||
// }
|
||||
// rej(response.error);
|
||||
// }
|
||||
// );
|
||||
// });
|
||||
|
||||
// let results = []
|
||||
// newActiveChats?.groups?.forEach(newChat => {
|
||||
// let isNewer = true;
|
||||
// oldActiveChats?.data?.groups?.forEach(oldChat => {
|
||||
// if (newChat?.timestamp <= oldChat?.timestamp) {
|
||||
// isNewer = false;
|
||||
// }
|
||||
// });
|
||||
// if (isNewer) {
|
||||
// results.push(newChat)
|
||||
// console.log('This newChat is newer than all oldChats:', newChat);
|
||||
// }
|
||||
// });
|
||||
|
||||
// if(results?.length > 0){
|
||||
// if (!lastGroupNotification.current || (Date.now() - lastGroupNotification.current >= 60000)) {
|
||||
// console.log((Date.now() - lastGroupNotification.current >= 60000), lastGroupNotification.current)
|
||||
// chrome?.runtime?.sendMessage(
|
||||
// {
|
||||
// action: "notification",
|
||||
// payload: {
|
||||
// },
|
||||
// },
|
||||
// (response) => {
|
||||
// console.log({ response });
|
||||
// if (!response?.error) {
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
// );
|
||||
// audio.play();
|
||||
// lastGroupNotification.current = Date.now()
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
// } catch (error) {
|
||||
// console.log('error not', error)
|
||||
// if(!isFocusedRef.current){
|
||||
// chrome?.runtime?.sendMessage(
|
||||
// {
|
||||
// action: "notification",
|
||||
// payload: {
|
||||
// },
|
||||
// },
|
||||
// (response) => {
|
||||
// console.log({ response });
|
||||
// if (!response?.error) {
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
// );
|
||||
// audio.play();
|
||||
// lastGroupNotification.current = Date.now()
|
||||
// }
|
||||
|
||||
// } finally {
|
||||
|
||||
// chrome?.runtime?.sendMessage(
|
||||
// {
|
||||
// action: "setChatHeads",
|
||||
// payload: {
|
||||
// data,
|
||||
// },
|
||||
// }
|
||||
// );
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
const getAdmins = async (groupId) => {
|
||||
try {
|
||||
|
@@ -48,20 +48,7 @@ export const GroupJoinRequests = ({ myAddress, groups, setOpenManageMembers, get
|
||||
return true
|
||||
})
|
||||
|
||||
// const getJoinGroupRequests = groupsAsAdmin.map(async (group)=> {
|
||||
// console.log('getJoinGroupRequests', group)
|
||||
// const joinRequestResponse = await requestQueueGroupJoinRequests.enqueue(()=> {
|
||||
// return fetch(
|
||||
// `${getBaseApiReact()}/groups/joinrequests/${group.groupId}`
|
||||
// );
|
||||
// })
|
||||
|
||||
// const joinRequestData = await joinRequestResponse.json()
|
||||
// return {
|
||||
// group,
|
||||
// data: joinRequestData
|
||||
// }
|
||||
// })
|
||||
|
||||
await Promise.all(getAllGroupsAsAdmin)
|
||||
const res = await Promise.all(groupsAsAdmin.map(async (group)=> {
|
||||
|
||||
|
Reference in New Issue
Block a user