mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
Merge pull request #514 from amnezia-vpn/fix/android-camera
Hide "QR-code" button from config import menu for Android devices wit…
This commit is contained in:
@@ -206,3 +206,14 @@ void SettingsController::toggleScreenshotsEnabled(bool enable)
|
||||
});
|
||||
#endif
|
||||
}
|
||||
|
||||
bool SettingsController::isCameraPresent()
|
||||
{
|
||||
#if defined Q_OS_IOS
|
||||
return true;
|
||||
#elif defined Q_OS_ANDROID
|
||||
return AndroidController::instance()->isCameraPresent();
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -59,6 +59,8 @@ public slots:
|
||||
bool isScreenshotsEnabled();
|
||||
void toggleScreenshotsEnabled(bool enable);
|
||||
|
||||
bool isCameraPresent();
|
||||
|
||||
signals:
|
||||
void primaryDnsChanged();
|
||||
void secondaryDnsChanged();
|
||||
|
||||
@@ -90,7 +90,7 @@ It's okay as long as it's from someone you trust.")
|
||||
|
||||
LabelWithButtonType {
|
||||
Layout.fillWidth: true
|
||||
visible: GC.isMobile()
|
||||
visible: SettingsController.isCameraPresent()
|
||||
|
||||
text: qsTr("QR-code")
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
@@ -105,7 +105,7 @@ It's okay as long as it's from someone you trust.")
|
||||
}
|
||||
|
||||
DividerType {
|
||||
visible: GC.isMobile()
|
||||
visible: SettingsController.isCameraPresent()
|
||||
}
|
||||
|
||||
LabelWithButtonType {
|
||||
|
||||
Reference in New Issue
Block a user