else:
callbackNumber = self._accountDialog.selectedCallback
self._session.set_callback_number(callbackNumber)
- self._app.alarmHandler.apply_settings(self._accountDialog.notifications, self._accountDialog.notificationTime)
+
+ if (
+ self._accountDialog.notifyOnMissed or
+ self._accountDialog.notifyOnVoicemail or
+ self._accountDialog.notifyOnSms
+ ):
+ notifications = self._accountDialog.notifications
+ else:
+ notifications = self._accountDialog.ALARM_NONE
+ self._app.alarmHandler.apply_settings(notifications, self._accountDialog.notificationTime)
+
self._app.notifyOnMissed = self._accountDialog.notifyOnMissed
self._app.notifyOnVoicemail = self._accountDialog.notifyOnVoicemail
self._app.notifyOnSms = self._accountDialog.notifyOnSms
def _on_app_alert(self):
with qui_utils.notify_error(self._errorLog):
if self._session.state == self._session.LOGGEDIN_STATE:
- self._session.update_messages(force=True)
+ messageType = {
+ (True, True): self._session.MESSAGE_ALL,
+ (True, False): self._session.MESSAGE_TEXTS,
+ (False, True): self._session.MESSAGE_VOICEMAILS,
+ }[(self._app.notifyOnSms, self._app.notifyOnVoicemail)]
+ self._session.update_messages(messageType, force=True)
@QtCore.pyqtSlot()
@misc_utils.log_exception(_moduleLogger)