From sitting33 to ~emersion/public-inbox
--- components/app.js | 105 +++++++++++++++++++++++++++++++----- components/settings-form.js | 42 +++++++++++++++ state.js | 1 + 3 files changed, 134 insertions(+), 14 deletions(-) diff --git a/components/app.js b/components/app.js index 59c6c44..2838c5a 100644 --- a/components/app.js +++ b/components/app.js @@ -560,6 +560,8 @@ export default class App extends Component { return State.updateBuffer(state, buf.id, { unread: Unread.NONE, }); [message trimmed]
From sitting33 to ~emersion/public-inbox
--- components/app.js | 65 ++++++++++++++++++++++++++++++----------------- 1 file changed, 41 insertions(+), 24 deletions(-) diff --git a/components/app.js b/components/app.js index 69098d9..59c6c44 100644 --- a/components/app.js +++ b/components/app.js @@ -529,33 +529,13 @@ export default class App extends Component { client.setReadMarker(storedBuffer.name, readReceipt.time); } switchBuffer(id) { let buf;[message trimmed]
From sitting33 to ~emersion/public-inbox
--- components/app.js | 99 ++++++++++++++++++++++++++++++++++--- components/settings-form.js | 42 ++++++++++++++++ state.js | 1 + 3 files changed, 134 insertions(+), 8 deletions(-) diff --git a/components/app.js b/components/app.js index 89f3ee6..bab59ec 100644 --- a/components/app.js +++ b/components/app.js @@ -560,6 +560,8 @@ export default class App extends Component { return State.updateBuffer(state, buf.id, { unread: Unread.NONE, }); [message trimmed]
From sitting33 to ~emersion/public-inbox
--- components/app.js | 72 +++++++++++++++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 24 deletions(-) diff --git a/components/app.js b/components/app.js index 3987749..89f3ee6 100644 --- a/components/app.js +++ b/components/app.js @@ -228,6 +228,7 @@ export default class App extends Component { this.handleSettingsChange = this.handleSettingsChange.bind(this); this.handleSettingsDisconnect = this.handleSettingsDisconnect.bind(this); this.handleSwitchSubmit = this.handleSwitchSubmit.bind(this); this.handleDocumentFocus = this.handleDocumentFocus.bind(this); [message trimmed]
From to ~emersion/public-inbox
> On Saturday, June 24th, 2023 at 14:02, sitting33 <me@sit.sh> wrote: > > --- > > This adds the number of unread buffers or messages (configurable) into > > the document title. > > > > components/app.js | 98 ++++++++++++++++++++++++++++++++++--- > > components/settings-form.js | 32 ++++++++++++ > > state.js | 1 + > > 3 files changed, 123 insertions(+), 8 deletions(-) > > > > diff --git a/components/app.js b/components/app.js > > index 5575527..ab174ce 100644 > > --- a/components/app.js > > +++ b/components/app.js
From to ~emersion/public-inbox
В письме от пятница, 7 июля 2023 г. 15:55:08 +03 пользователь Simon Ser написал: > On Saturday, June 24th, 2023 at 14:02, sitting33 <me@sit.sh> wrote: > > --- > > I split the previous revision of the patch into two parts. The one > > defers sending MARKREAD when the tab isn't focused. When it regains > > focus, the currently active buffers gets marked as read. > > Thanks, the meat of the patch looks good to me :) > > > I had to extract a new method, markBufferAsRead, that is called in > > switchBuffer and handleDocumentFocus. handleDocumentFocus calls it with > > updatePrevReceipt = false, so that the divider in between read and > > unread messages doesn't disappear when we focus the window twice.
From sitting33 to ~emersion/public-inbox
Oops, I forgot to add that this patch is for gamja. Sorry!
From sitting33 to ~emersion/public-inbox
--- This adds the number of unread buffers or messages (configurable) into the document title. components/app.js | 98 ++++++++++++++++++++++++++++++++++--- components/settings-form.js | 32 ++++++++++++ state.js | 1 + 3 files changed, 123 insertions(+), 8 deletions(-) diff --git a/components/app.js b/components/app.js index 5575527..ab174ce 100644 --- a/components/app.js +++ b/components/app.js @@ -570,6 +570,8 @@ export default class App extends Component { [message trimmed]
From sitting33 to ~emersion/public-inbox
--- I split the previous revision of the patch into two parts. The one defers sending MARKREAD when the tab isn't focused. When it regains focus, the currently active buffers gets marked as read. I had to extract a new method, markBufferAsRead, that is called in switchBuffer and handleDocumentFocus. handleDocumentFocus calls it with updatePrevReceipt = false, so that the divider in between read and unread messages doesn't disappear when we focus the window twice. components/app.js | 77 +++++++++++++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 29 deletions(-) diff --git a/components/app.js b/components/app.js [message trimmed]
From to ~emersion/public-inbox
> Nice! Would it be possible to split this patch into two, one to change the > title, and the other one with the focus stuff? I also thought about that, but came to the conclusion that one would be useless without the other. It's possible, though. I'll send another revision soon, should I split the changes? > I wonder if we want to display the total number of unread buffers, or only > the number of unread highlights. The former sounds a bit spammy: > high-traffic channels have new messages every few seconds... I believe that the best solution would be to let the user choose. I will look into it in the next revision.