Skip to content

Commit 9c0580c

Browse files
committed
add show past notifs
1 parent f83fe2f commit 9c0580c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

mod.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@
6161
"name": "Test",
6262
"type": "custom:test-notification"
6363
},
64+
"past-notifications": {
65+
"name": "Show Past Notifications",
66+
"description": "If notifications that were supposed to be shown while you weren't playing Geometry Dash should be shown. A maximum of <cy>2 days</c> while you weren't playing Geometry Dash will be shown.",
67+
"type": "bool",
68+
"default": true
69+
},
6470
"everywhereElse": {
6571
"name": "Everywhere Else",
6672
"description": "If notifications should show on any screen.",

src/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ class MQTT {
101101
);
102102
// false = retain, true = dies after disconnect
103103
//m_connOpts.set_clean_session(true);
104-
m_connOpts.set_clean_session(false);
104+
//m_connOpts.set_clean_session(false);
105+
bool showPastNotifs = Mod::get()->template getSettingValue<bool>("past-notifications");
106+
m_connOpts.set_clean_session(!showPastNotifs);
105107
m_connOpts.set_connect_timeout(10);
106108
}
107109
void connect() {

0 commit comments

Comments
 (0)