mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
SEARCH-154 - get latest messages timestamp
This commit is contained in:
@@ -232,6 +232,24 @@ class Search {
|
||||
});
|
||||
}
|
||||
|
||||
getLatestMessageTimestamp() {
|
||||
let self = this;
|
||||
return new Promise(function (resolve, reject) {
|
||||
libSymphonySearch.symSEGetLastMessageTimestampAsync(self.indexFolderName, function (err, res) {
|
||||
if (err) {
|
||||
reject(new Error(err));
|
||||
}
|
||||
const returnedResult = res;
|
||||
try {
|
||||
let ret = returnedResult.readCString();
|
||||
resolve(ret);
|
||||
} finally {
|
||||
libSymphonySearch.symSEFreeResult(returnedResult);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* This the query constructor
|
||||
* for the query search function
|
||||
|
||||
Reference in New Issue
Block a user