Push rules sound: be a string, not just on/off

This commit is contained in:
miruka
2020-11-01 03:15:00 -04:00
parent d2fc003617
commit 8748c6445f
6 changed files with 19 additions and 10 deletions

View File

@@ -107,7 +107,7 @@ class PushRule(ModelItem):
notify: bool = False
highlight: bool = False
bubble: bool = False
sound: bool = False
sound: str = "" # usually "default" when set
urgency_hint: bool = False
def __lt__(self, other: "PushRule") -> bool:

View File

@@ -108,7 +108,11 @@ class Model(MutableMapping):
del self._sorted_data[index_then]
self._sorted_data.add(new)
index_now = self._sorted_data.index(new)
try:
index_now = self._sorted_data.index(new)
except ValueError:
import remote_pdb; remote_pdb.RemotePdb("127.0.0.1", 4444).set_trace()
pass
# Insert into dict data