mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
* do not remember last used list for readonly users (GH-47)
This commit is contained in:
parent
a91aaa09af
commit
37e6f30a57
1 changed files with 5 additions and 2 deletions
|
|
@ -764,7 +764,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
}
|
||||
else {
|
||||
const lastOpenList = getLocalStorageItem('lastList');
|
||||
if (lastOpenList) {
|
||||
if (lastOpenList && !flag.readOnly) {
|
||||
list = res.list.find( item => !item.hidden && lastOpenList == item.id );
|
||||
}
|
||||
if (!list) {
|
||||
|
|
@ -1551,7 +1551,9 @@ function tabSelect(elementOrId)
|
|||
var newTitle = curList.name + ' - ' + _mtt.options.title;
|
||||
var isFirstLoad = flag.firstLoad;
|
||||
updateHistoryState( { list:id }, _mtt.urlForList(curList), newTitle );
|
||||
setLocalStorageItem('lastList', ''+id);
|
||||
if (!flag.readOnly) {
|
||||
setLocalStorageItem('lastList', ''+id);
|
||||
}
|
||||
|
||||
if (curList.hidden && flag.readOnly != true) {
|
||||
curList.hidden = false;
|
||||
|
|
@ -2643,6 +2645,7 @@ function doAuth(form)
|
|||
if(json.logged)
|
||||
{
|
||||
flag.isLogged = true;
|
||||
window.location.hash = '';
|
||||
window.location.reload();
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue