mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-03 19:54:14 +00:00 
			
		
		
		
	Automatically reoopen conversations on page reload
This commit is contained in:
		@@ -4,7 +4,7 @@
 | 
			
		||||
 * @author Pierre HUBERT
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
ComunicWeb.components.conversations.interface = {
 | 
			
		||||
const ConversationsInterface = {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * @var {Object} __conversationsList Cached list of conversations
 | 
			
		||||
@@ -486,6 +486,26 @@ ComunicWeb.components.conversations.interface = {
 | 
			
		||||
	},
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ComunicWeb.components.conversations.interface = ConversationsInterface;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Get information about a single conversation
 | 
			
		||||
 * 
 | 
			
		||||
 * @param {number} convID The ID of the target conversation
 | 
			
		||||
 */
 | 
			
		||||
async function getSingleConversation(convID) {
 | 
			
		||||
	return new Promise((res, err) => {
 | 
			
		||||
		ConversationsInterface.getInfosOne(convID, (info) => {
 | 
			
		||||
			if(info.error)
 | 
			
		||||
				err(info.error)
 | 
			
		||||
			else
 | 
			
		||||
				res(info)
 | 
			
		||||
		}, false)
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//Register conversations cache cleaning function
 | 
			
		||||
ComunicWeb.common.cacheManager.registerCacheCleaner("ComunicWeb.components.conversations.interface.emptyCache");
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user