mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Only remind when period != 0 seconds and more than 0 messages
This commit is contained in:
parent
78e4524de0
commit
d888a378d3
@ -41,7 +41,7 @@ static log_level_t _get_log_level(char *log_level);
|
|||||||
gboolean _process_input(char *inp);
|
gboolean _process_input(char *inp);
|
||||||
static void _create_config_directory();
|
static void _create_config_directory();
|
||||||
|
|
||||||
static gdouble unread_period = 5;
|
static gdouble remind_period = 0;
|
||||||
|
|
||||||
void
|
void
|
||||||
profanity_run(void)
|
profanity_run(void)
|
||||||
@ -63,10 +63,13 @@ profanity_run(void)
|
|||||||
|
|
||||||
gdouble elapsed = g_timer_elapsed(timer, NULL);
|
gdouble elapsed = g_timer_elapsed(timer, NULL);
|
||||||
|
|
||||||
if (elapsed >= unread_period) {
|
// 0 means to not remind
|
||||||
|
if (remind_period > 0 && elapsed >= remind_period) {
|
||||||
|
if (win_get_unread() > 0) {
|
||||||
log_info("Unread : %d", win_get_unread());
|
log_info("Unread : %d", win_get_unread());
|
||||||
g_timer_start(timer);
|
g_timer_start(timer);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
win_handle_special_keys(&ch);
|
win_handle_special_keys(&ch);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user