New thread list logic (step 1)

This commit is contained in:
RainLoop Team 2015-04-20 23:49:51 +04:00
parent c73eb76816
commit b656b6365b
10 changed files with 186 additions and 78 deletions

View file

@ -75,15 +75,23 @@
MailBoxUserScreen.prototype.onRoute = function (sFolderHash, iPage, sSearch)
{
var
sFolderFullNameRaw = Cache.getFolderFullNameRaw(sFolderHash),
oFolder = Cache.getFolderFromCacheList(sFolderFullNameRaw)
sThreadUid = sFolderHash.replace(/^(.+)\|([\d]+)$/, '$2'),
oFolder = Cache.getFolderFromCacheList(Cache.getFolderFullNameRaw(
sFolderHash.replace(/\|([\d]+)$/, '')))
;
if (oFolder)
{
if (sFolderHash === sThreadUid)
{
sThreadUid = '';
}
FolderStore.currentFolder(oFolder);
MessageStore.messageListPage(iPage);
MessageStore.messageListSearch(sSearch);
MessageStore.messageListThreadUid(sThreadUid);
require('App/User').reloadMessageList();
}