From 43636a8198b2a523df91db8cce356e9d238bb686 Mon Sep 17 00:00:00 2001 From: Sven Jacobs Date: Thu, 30 May 2024 15:30:28 +0200 Subject: [PATCH] feat: add option to open URLs with custom tabs (#407) --- app/build.gradle.kts | 1 + app/src/main/AndroidManifest.xml | 8 ++- .../com/svenjacobs/app/leon/MainActivity.kt | 37 +++++++++++ .../app/leon/datastore/AppDataStoreManager.kt | 12 ++++ .../app/leon/ui/screens/main/MainScreen.kt | 23 ++++++- .../screens/main/model/MainScreenViewModel.kt | 5 +- .../ui/screens/settings/SettingsScreen.kt | 62 +++++++++++++------ .../settings/model/SettingsScreenViewModel.kt | 13 +++- app/src/main/res/values-de/strings.xml | 3 +- app/src/main/res/values-pl/strings.xml | 3 +- app/src/main/res/values-ru/strings.xml | 3 +- app/src/main/res/values-vi/strings.xml | 1 + app/src/main/res/values/strings.xml | 3 +- gradle/libs.versions.toml | 1 + 14 files changed, 147 insertions(+), 28 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index cc373da3..ffd15303 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -145,6 +145,7 @@ dependencies { implementation(libs.androidx.lifecycle.viewmodel.ktx) implementation(libs.androidx.datastore.preferences) implementation(libs.kotlinx.coroutines.android) + implementation(libs.androidx.browser) implementation(libs.jakewharton.timber) debugImplementation(libs.facebook.stetho) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 2b8f0d5d..2ca759f4 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ Action after clean Do nothing Open share menu diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 5274efd3..0ac8dcbb 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -1,6 +1,6 @@ + Open URLs in browser custom tabs Action after clean Do nothing Open share menu diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 4e999ae8..f7c607fb 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -37,6 +37,7 @@ Đặt lại Chỉ trích xuất URL Đăng ký Léon làm trình duyệt + Open URLs in browser custom tabs Hành động sau khi làm sạch Không làm gì cả Mở menu chia sẻ diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 19dae85c..5f580eda 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,6 +1,6 @@