Fix toast notifications to not require sound be on
This commit is contained in:
parent
cab2412284
commit
e29791402d
1 changed files with 19 additions and 13 deletions
|
@ -1355,17 +1355,23 @@ class PesterWindow(MovingWindow):
|
||||||
systemColor = QtGui.QColor(self.theme["memos/systemMsgColor"])
|
systemColor = QtGui.QColor(self.theme["memos/systemMsgColor"])
|
||||||
msg = "<c=%s>%s</c>" % (systemColor.name(), msg)
|
msg = "<c=%s>%s</c>" % (systemColor.name(), msg)
|
||||||
memo.addMessage(msg, handle)
|
memo.addMessage(msg, handle)
|
||||||
if self.config.soundOn():
|
mentioned = False
|
||||||
if self.config.memoSound():
|
|
||||||
if self.config.nameSound():
|
|
||||||
m = convertTags(msg, "text")
|
m = convertTags(msg, "text")
|
||||||
if m.find(":") <= 3:
|
if m.find(":") <= 3:
|
||||||
m = m[m.find(":"):]
|
m = m[m.find(":"):]
|
||||||
for search in self.userprofile.getMentions():
|
for search in self.userprofile.getMentions():
|
||||||
if re.search(search, m):
|
if re.search(search, m):
|
||||||
|
mentioned = True
|
||||||
|
break
|
||||||
|
if mentioned:
|
||||||
if self.config.notifyOptions() & self.config.INITIALS:
|
if self.config.notifyOptions() & self.config.INITIALS:
|
||||||
t = self.tm.Toast(chan, re.sub("</?c(=.*?)?>", "", msg))
|
t = self.tm.Toast(chan, re.sub("</?c(=.*?)?>", "", msg))
|
||||||
t.show()
|
t.show()
|
||||||
|
|
||||||
|
if self.config.soundOn():
|
||||||
|
if self.config.memoSound():
|
||||||
|
if self.config.nameSound():
|
||||||
|
if mentioned:
|
||||||
self.namesound.play()
|
self.namesound.play()
|
||||||
return
|
return
|
||||||
if self.honk and re.search(r"\bhonk\b", convertTags(msg, "text"), re.I):
|
if self.honk and re.search(r"\bhonk\b", convertTags(msg, "text"), re.I):
|
||||||
|
|
Loading…
Reference in a new issue