Fix hide replys button on nav change
This commit is contained in:
parent
1df924df1b
commit
0691317d19
2 changed files with 5 additions and 2 deletions
|
@ -187,7 +187,7 @@
|
|||
</div>
|
||||
<div id="dms" class="hide">
|
||||
</div>
|
||||
<div id="timeline" class="events"></div>
|
||||
<div id="timeline" class="events" data-hide-replys="true"></div>
|
||||
<div id="settings" class="hide">
|
||||
<section>
|
||||
<header>
|
||||
|
|
|
@ -36,6 +36,10 @@ function view_timeline_apply_mode(model, mode, opts={}, push_state=true) {
|
|||
const el = view_get_timeline_el();
|
||||
const now = new Date().getTime();
|
||||
|
||||
if (opts.hide_replys == undefined) {
|
||||
opts.hide_replys = el.dataset.hideReplys == "true";
|
||||
}
|
||||
|
||||
// Don't do anything if we are already here
|
||||
if (el.dataset.mode == mode) {
|
||||
switch (mode) {
|
||||
|
@ -96,7 +100,6 @@ function view_timeline_apply_mode(model, mode, opts={}, push_state=true) {
|
|||
el.dataset.mode = mode;
|
||||
delete el.dataset.threadId;
|
||||
delete el.dataset.pubkey;
|
||||
delete el.dataset.hideReplys;
|
||||
switch(mode) {
|
||||
case VM_FRIENDS:
|
||||
el.dataset.hideReplys = opts.hide_replys;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue