mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-29 15:26:27 +00:00
Automatically refresh sidebar
This commit is contained in:
parent
cd24434414
commit
9f408509d1
@ -118,9 +118,15 @@ ComunicWeb.components.sideBar.main = {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.refreshMemberships(userMemberships);
|
this.refreshMemberships(userMemberships);
|
||||||
|
let interval = setInterval(() => {
|
||||||
|
if(userMemberships.isConnected)
|
||||||
|
this.refreshMemberships(userMemberships);
|
||||||
|
else
|
||||||
|
clearInterval(interval);
|
||||||
|
}, 15000);
|
||||||
|
|
||||||
|
|
||||||
// Recent conversations
|
/*// Recent conversations
|
||||||
createElem2({
|
createElem2({
|
||||||
appendTo: section,
|
appendTo: section,
|
||||||
type: "div",
|
type: "div",
|
||||||
@ -132,7 +138,7 @@ ComunicWeb.components.sideBar.main = {
|
|||||||
type: "ul",
|
type: "ul",
|
||||||
class: "sidebar-menu recents-conversations-list hide-on-collapse",
|
class: "sidebar-menu recents-conversations-list hide-on-collapse",
|
||||||
innerHTML: "<li><a>TO COME</a></li>"
|
innerHTML: "<li><a>TO COME</a></li>"
|
||||||
});
|
});*/
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -223,7 +229,7 @@ ComunicWeb.components.sideBar.main = {
|
|||||||
appendTo: a,
|
appendTo: a,
|
||||||
type: "div",
|
type: "div",
|
||||||
class: "subinfo",
|
class: "subinfo",
|
||||||
onclick: (e) => e.stopImmediatePropagation()
|
onclick: friend.accepted != 1 ? (e) => e.stopImmediatePropagation() : undefined
|
||||||
});
|
});
|
||||||
|
|
||||||
// Check if friendship request has been accepted or not
|
// Check if friendship request has been accepted or not
|
||||||
@ -307,7 +313,7 @@ ComunicWeb.components.sideBar.main = {
|
|||||||
appendTo: a,
|
appendTo: a,
|
||||||
type: "div",
|
type: "div",
|
||||||
class: "subinfo",
|
class: "subinfo",
|
||||||
onclick: (e) => e.stopImmediatePropagation()
|
//onclick: (e) => e.stopImmediatePropagation()
|
||||||
});
|
});
|
||||||
|
|
||||||
if(group.membership == "pending") {
|
if(group.membership == "pending") {
|
||||||
|
Loading…
Reference in New Issue
Block a user