Android notification and routing (#797)
Android notification and routing
This commit is contained in:
parent
ff348a348c
commit
abb3c918e3
40 changed files with 1108 additions and 543 deletions
|
|
@ -30,6 +30,9 @@ SettingsController::SettingsController(const QSharedPointer<ServersModel> &serve
|
|||
{
|
||||
m_appVersion = QString("%1 (%2, %3)").arg(QString(APP_VERSION), __DATE__, GIT_COMMIT_HASH);
|
||||
checkIfNeedDisableLogs();
|
||||
#ifdef Q_OS_ANDROID
|
||||
connect(AndroidController::instance(), &AndroidController::notificationStateChanged, this, &SettingsController::onNotificationStateChanged);
|
||||
#endif
|
||||
}
|
||||
|
||||
void SettingsController::toggleAmneziaDns(bool enable)
|
||||
|
|
@ -233,3 +236,19 @@ void SettingsController::toggleKillSwitch(bool enable)
|
|||
{
|
||||
m_settings->setKillSwitchEnabled(enable);
|
||||
}
|
||||
|
||||
bool SettingsController::isNotificationPermissionGranted()
|
||||
{
|
||||
#ifdef Q_OS_ANDROID
|
||||
return AndroidController::instance()->isNotificationPermissionGranted();
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void SettingsController::requestNotificationPermission()
|
||||
{
|
||||
#ifdef Q_OS_ANDROID
|
||||
AndroidController::instance()->requestNotificationPermission();
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue