wangp / bower

A curses terminal client for the Notmuch email system
Other
128 stars 11 forks source link

[feature request] refresh view when polling and new message(s) arrive #84

Closed craftyguy closed 3 years ago

craftyguy commented 3 years ago

Right now it just triggers poll_notify (if set), but having it also refresh the view would be nice. Not that hitting = is hard, but sometimes I am away and miss the notification (e.g. if it's calling notify-send).

wangp commented 3 years ago

I didn't want the view changing while the user is using the program, but it might be nice to automatically refresh the view after a period of inactivity.

(The status bar says "n messages since refresh" in case you miss the notification.)

craftyguy commented 3 years ago

Ah, that makes sense..

(The status bar says "n messages since refresh" in case you miss the notification.)

Hmm, I didn't notice that message before, I'll look for it next time. Thanks!

wangp commented 3 years ago

it might be nice to automatically refresh the view after a period of inactivity.

I have implemented this on the auto-refresh branch. It is off by default.

craftyguy commented 3 years ago

awesome! I'll give it a try 😄

craftyguy commented 3 years ago

So it works most of the time, though sometimes I open a thread and it's completely empty (thread view shows nothing, and message body view shows nothing either). I'm not sure if that's related to this change or not. Previously I was running master branch and don't recall seeing this.

It has happened only a few times, like maybe 3 times in the last 2 days since I've been running the auto-refresh branch. I haven't noticed anything special about the threads it can't open. If I restart bower, the thread that previously didn't open/display will open again. If there's some way to enable logging, I can try that too...

wangp commented 3 years ago

I haven't seen that, and I can't think of any reason why the recent change might cause such behaviour.

You could try using extrace to log the notmuch calls, and see if you can reproduce something on the command line.

wangp commented 3 years ago

Merged to master.