mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 06:35:08 -04:00
Change how do you put chat tittle saving chat name into variable on cache GXS info
This commit is contained in:
parent
ba72332ed8
commit
ea8d03bc10
4 changed files with 18 additions and 6 deletions
|
@ -51,7 +51,7 @@ QtObject {
|
|||
}
|
||||
|
||||
function setRemoteGXS (chatId, remoteGXS){
|
||||
if (!lastMessageList[chatId]) {
|
||||
if (!lastMessageList[chatId]) {
|
||||
lastMessageList[chatId] = {}
|
||||
console.log("Last message cache created!")
|
||||
}
|
||||
|
@ -66,13 +66,19 @@ QtObject {
|
|||
|
||||
function getChatIdFromGxs (gxs){
|
||||
for (var key in lastMessageList) {
|
||||
if ( lastMessageList[key].remoteGXS === gxs ) {
|
||||
if ( lastMessageList[key].remoteGXS &&
|
||||
lastMessageList[key].remoteGXS.gxs === gxs ) {
|
||||
return key
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
function getGxsFromChatId (chatId){
|
||||
if (lastMessageList[chatId]) return lastMessageList[chatId].remoteGXS
|
||||
return undefined
|
||||
}
|
||||
|
||||
function getChatLastMessage (chatId){
|
||||
if (lastMessageList[chatId]) {
|
||||
return lastMessageList[chatId].lastMessage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue