diff options
author | Alex Ning <chineseperson5@gmail.com> | 2021-10-10 13:51:10 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2021-10-10 13:51:10 +0000 |
commit | 43b9abd6ee455158553fbbc70df3c27eedd22b21 (patch) | |
tree | 88c48a1de545d82be50730b511b93e0737039bbb /app | |
parent | d40b81d7993b189142eadd79ab6b1daabba248d0 (diff) | |
download | infinity-for-reddit-43b9abd6ee455158553fbbc70df3c27eedd22b21.tar infinity-for-reddit-43b9abd6ee455158553fbbc70df3c27eedd22b21.tar.gz infinity-for-reddit-43b9abd6ee455158553fbbc70df3c27eedd22b21.tar.bz2 infinity-for-reddit-43b9abd6ee455158553fbbc70df3c27eedd22b21.tar.lz infinity-for-reddit-43b9abd6ee455158553fbbc70df3c27eedd22b21.tar.xz infinity-for-reddit-43b9abd6ee455158553fbbc70df3c27eedd22b21.tar.zst infinity-for-reddit-43b9abd6ee455158553fbbc70df3c27eedd22b21.zip |
New option: Link Handler. Removed option: Open Link In App.
Diffstat (limited to 'app')
24 files changed, 37 insertions, 30 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java index 3db1af77..2c337c63 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java @@ -298,10 +298,13 @@ public class LinkResolverActivity extends AppCompatActivity { return; } - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.OPEN_LINK_IN_APP, false)) { + int linkHandler = Integer.parseInt(mSharedPreferences.getString(SharedPreferencesUtils.LINK_HANDLER, "0")); + if (linkHandler == 0) { + openInBrowser(uri, pm, true); + } else if (linkHandler == 1) { openInCustomTabs(uri, pm, true); } else { - openInBrowser(uri, pm, true); + openInWebView(uri); } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/AdvancedPreferenceFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/AdvancedPreferenceFragment.java index f133863d..45661b85 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/AdvancedPreferenceFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/AdvancedPreferenceFragment.java @@ -1,5 +1,8 @@ package ml.docilealligator.infinityforreddit.settings; +import static android.app.Activity.RESULT_OK; +import static android.content.Intent.ACTION_OPEN_DOCUMENT_TREE; + import android.app.Activity; import android.content.Context; import android.content.Intent; @@ -39,9 +42,6 @@ import ml.docilealligator.infinityforreddit.asynctasks.RestoreSettings; import ml.docilealligator.infinityforreddit.events.RecreateActivityEvent; import ml.docilealligator.infinityforreddit.utils.SharedPreferencesUtils; -import static android.app.Activity.RESULT_OK; -import static android.content.Intent.ACTION_OPEN_DOCUMENT_TREE; - /** * A simple {@link Fragment} subclass. */ @@ -230,6 +230,8 @@ public class AdvancedPreferenceFragment extends PreferenceFragmentCompat { editor.remove(SharedPreferencesUtils.NSFW_KEY_LEGACY); editor.remove(SharedPreferencesUtils.BLUR_NSFW_KEY_LEGACY); editor.remove(SharedPreferencesUtils.BLUR_SPOILER_KEY_LEGACY); + editor.remove(SharedPreferencesUtils.CONFIRM_TO_EXIT_LEGACY); + editor.remove(SharedPreferencesUtils.OPEN_LINK_IN_APP_LEGACY); SharedPreferences.Editor sortTypeEditor = mSortTypeSharedPreferences.edit(); sortTypeEditor.remove(SharedPreferencesUtils.SORT_TYPE_ALL_POST_LEGACY); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/SharedPreferencesUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/SharedPreferencesUtils.java index 9e3f8c69..6235c3c6 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/SharedPreferencesUtils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/SharedPreferencesUtils.java @@ -93,7 +93,7 @@ public class SharedPreferencesUtils { public static final String VOLUME_KEYS_NAVIGATE_COMMENTS = "volume_keys_navigate_comments"; public static final String VOLUME_KEYS_NAVIGATE_POSTS = "volume_keys_navigate_posts"; public static final String MUTE_VIDEO = "mute_video"; - public static final String OPEN_LINK_IN_APP = "open_link_in_app"; + public static final String LINK_HANDLER = "link_handler"; public static final String VIDEO_AUTOPLAY = "video_autoplay"; public static final String VIDEO_AUTOPLAY_VALUE_ALWAYS_ON = "2"; public static final String VIDEO_AUTOPLAY_VALUE_ON_WIFI = "1"; @@ -363,4 +363,5 @@ public class SharedPreferencesUtils { public static final String BLUR_NSFW_KEY_LEGACY = "blur_nsfw"; public static final String BLUR_SPOILER_KEY_LEGACY = "blur_spoiler"; public static final String CONFIRM_TO_EXIT_LEGACY = "confirm_to_exit"; + public static final String OPEN_LINK_IN_APP_LEGACY = "open_link_in_app"; } diff --git a/app/src/main/res/layout/bottom_app_bar.xml b/app/src/main/res/layout/bottom_app_bar.xml index fa1d886f..47a35792 100644 --- a/app/src/main/res/layout/bottom_app_bar.xml +++ b/app/src/main/res/layout/bottom_app_bar.xml @@ -3,7 +3,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/bottom_app_bar_bottom_app_bar" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="48dp" android:visibility="gone" app:fabAlignmentMode="center"> diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 10b02874..b9381784 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -311,7 +311,6 @@ Tippen für Neuversuch."</string> <string name="settings_gestures_and_buttons_title">"Gesten & Knöpfe"</string> <string name="settings_save_front_page_scrolled_position_title">"Scrollposition in HOME speichern"</string> <string name="settings_save_front_page_scrolled_position_summary">"Neue Beitrage nach dem Aktualisieren von HOME anzeigen (Frontseite, Sortierung: Beste)"</string> - <string name="settings_open_link_in_app_title">"Link in App öffnen"</string> <string name="settigns_video_title">"Video"</string> <string name="settings_video_autoplay_title">"Videos automatisch abspielen"</string> <string name="settings_mute_autoplaying_videos_title">"Automatisch abgespielte Videos stummschalten"</string> diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 58689b60..299018eb 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -318,7 +318,6 @@ Premio means prize, so it's better suited the first word instead of the second o <string name="settings_gestures_and_buttons_title">"Gestos y Botones"</string> <string name="settings_save_front_page_scrolled_position_title">"Guardar Posición en INICIO"</string> <string name="settings_save_front_page_scrolled_position_summary">"Ver nuevas publicaciones después de actualizar la página de INICIO (Página inicial, ordenar por: Lo mejor)"</string> - <string name="settings_open_link_in_app_title">"Abrir enlaces dentro de la App"</string> <string name="settigns_video_title">"Vídeo"</string> <string name="settings_video_autoplay_title">"Reproducción automática de Vídeo"</string> <string name="settings_mute_autoplaying_videos_title">"Silenciar Videos reproducidos automáticamente"</string> diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 176d913b..6d0b1c80 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -325,7 +325,6 @@ Appuyez pour réessayer."</string> <string name="settings_gestures_and_buttons_title">"Gestes & Boutons"</string> <string name="settings_save_front_page_scrolled_position_title">"Sauvegarder la position défilée dans l'accueil"</string> <string name="settings_save_front_page_scrolled_position_summary">"Parcourir les nouveaux messages après actualisation dans l'accueil (Front Page, type de tri : Meilleur)"</string> - <string name="settings_open_link_in_app_title">"Ouvrir les lien dans l'application"</string> <string name="settigns_video_title">"Vidéo"</string> <!-- Fuzzy --> diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index 34b7099d..fc9da9ac 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -330,7 +330,6 @@ Behavior --> <string name="settings_gestures_and_buttons_title">"जैस्चर्स एवं बटन्स"</string> <string name="settings_save_front_page_scrolled_position_title">"होम पर स्क्रौल की स्थिति स्थिर करें "</string> <string name="settings_save_front_page_scrolled_position_summary">"होम में ताजा करने पर नई पोस्ट्स देखें (मुख पृष्ट, क्रम: श्रेष्ठ)"</string> - <string name="settings_open_link_in_app_title">"लिंक एप में खोलें "</string> <string name="settigns_video_title">"वीडियो "</string> <string name="settings_video_autoplay_title">"वीडियो स्वचालन"</string> <string name="settings_mute_autoplaying_videos_title">"स्वचालित वीडियोज को मौन करें "</string> diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index a4906160..15d71b12 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -279,7 +279,6 @@ <string name="settings_gestures_and_buttons_title">"Geste i tipke"</string> <string name="settings_save_front_page_scrolled_position_title">"Spremi poziciju na NASLOVNICA"</string> <string name="settings_save_front_page_scrolled_position_summary">"Pregledavaj nove objave nakon osvježivanja u NASLOVNICA (Početna stranica, vrsta sortiranja: Najbolje)"</string> - <string name="settings_open_link_in_app_title">"Otvori poveznicu unutar aplikacije"</string> <string name="settigns_video_title">"Video"</string> <string name="settings_video_autoplay_title">"Automatsko pokretanje videozapisa"</string> <string name="settings_mute_autoplaying_videos_title">"Automatski pokrenuti videozapisi bez zvuka"</string> diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index b6c9eada..86c67dc7 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -287,7 +287,6 @@ <string name="settings_gestures_and_buttons_title">"Gesztusok és gombok"</string> <string name="settings_save_front_page_scrolled_position_title">"Görgetés pozíciójának mentése a Kezdőlapon"</string> <string name="settings_save_front_page_scrolled_position_summary">"Böngéssz új posztokat a Kezdőlap frissítése után (Kezdőlap, rendezés típusa: Legjobb)"</string> - <string name="settings_open_link_in_app_title">"Nyisd meg a linket appon belül"</string> <string name="settigns_video_title">"Videó"</string> <string name="settings_video_autoplay_title">"Videó autómatikus lejátszása"</string> <string name="settings_mute_autoplaying_videos_title">"Autómatikusan lejátszó videók némítása"</string> diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 5324b6ac..354409fa 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -302,7 +302,6 @@ Tocca per riprovare."</string> <string name="settings_gestures_and_buttons_title">"Gesti e pulsanti"</string> <string name="settings_save_front_page_scrolled_position_title">"Salva posizione di scorrimento nella HOME"</string> <string name="settings_save_front_page_scrolled_position_summary">"Sfoglia i nuovi post dopo l'aggiornamento in HOME (pagina iniziale, tipo di ordinamento: migliore)"</string> - <string name="settings_open_link_in_app_title">"Apri Link nell'App"</string> <string name="settigns_video_title">"Video"</string> <string name="settings_video_autoplay_title">"Autoriproduzione video"</string> <string name="settings_mute_autoplaying_videos_title">"Muta video autoriprodotti"</string> diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index fefb69b6..4e66254d 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -328,7 +328,6 @@ <string name="settings_gestures_and_buttons_title">"ジェスチャーとボタン"</string> <string name="settings_save_front_page_scrolled_position_title">"ホーム画面のスクロール位置を保存"</string> <string name="settings_save_front_page_scrolled_position_summary">"ホームを更新後は新しい投稿を表示 (フロントページ、並べ替え: ベスト)"</string> - <string name="settings_open_link_in_app_title">"リンクをアプリ内で開く"</string> <string name="settigns_video_title">"動画"</string> <string name="settings_video_autoplay_title">"動画を自動再生"</string> <string name="settings_mute_autoplaying_videos_title">"自動再生の動画をミュート"</string> diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 5f4702bc..51069f53 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -296,7 +296,6 @@ Tik om opnieuw te proberen."</string> <string name="settings_gestures_and_buttons_title">"Gebaren & Knoppen"</string> <string name="settings_save_front_page_scrolled_position_title">"Bewaar de scrollpositie in HOME"</string> <string name="settings_save_front_page_scrolled_position_summary">"Blader door nieuwe posts na het vernieuwen in HOME (voorpagina, sorteertype: Beste)"</string> - <string name="settings_open_link_in_app_title">"Open Link In App"</string> <string name="settigns_video_title">"Video"</string> <string name="settings_video_autoplay_title">"Video Automatisch Afspelen"</string> <string name="settings_mute_autoplaying_videos_title">"Demp Automatisch Afspelende Video's"</string> diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index aff2cfc6..899d49da 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -289,7 +289,6 @@ <string name="settings_gestures_and_buttons_title">"Gesty i przyciski"</string> <string name="settings_save_front_page_scrolled_position_title">"Zapisz pozycję na stronie głównej"</string> <string name="settings_save_front_page_scrolled_position_summary">"Przeglądaj nowe posty po odświeżeniu strony głównej"</string> - <string name="settings_open_link_in_app_title">"Otwórz link w aplikacji"</string> <string name="settigns_video_title">"Wideo"</string> <string name="settings_video_autoplay_title">"Autoodtwarzanie wideo"</string> <string name="settings_mute_autoplaying_videos_title">"Wycisz automatycznie odtwarzane wideo"</string> diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 1bcc851a..533cdabb 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -301,7 +301,6 @@ Toque para tentar novamente."</string> <string name="settings_gestures_and_buttons_title">"Gestos e Botões"</string> <string name="settings_save_front_page_scrolled_position_title">"Posição de rolagem salva na tela inicial"</string> <string name="settings_save_front_page_scrolled_position_summary">"Navegue por posts novos depois de atualizar a tela inicial ( Primeira Página, modo de classificação: Melhores)"</string> - <string name="settings_open_link_in_app_title">"Abrir Link no App"</string> <string name="settigns_video_title">"Vídeo"</string> <string name="settings_video_autoplay_title">"Reprodução Automática de Vídeo"</string> <string name="settings_mute_autoplaying_videos_title">"Silenciar Vídeos Reproduzidos Automaticamente"</string> diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 2aa5d3da..6bac5299 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -299,7 +299,6 @@ Toque para tentar novamente."</string> <string name="settings_gestures_and_buttons_title">"Gestos e Botões"</string> <string name="settings_save_front_page_scrolled_position_title">"Guardar Posição de Deslizamento em INÍCIO"</string> <string name="settings_save_front_page_scrolled_position_summary">"Explorar novas publicações após recarregar INÍCIO (Página Principal, ordenado por: Melhor)"</string> - <string name="settings_open_link_in_app_title">"Abrir Ligação na Aplicação"</string> <string name="settigns_video_title">"Vídeo"</string> <string name="settings_video_autoplay_title">"Reprodução Automática de Vídeos"</string> <string name="settings_mute_autoplaying_videos_title">"Vídeos em auto-reprodução Sem Som"</string> diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 4975a560..da45323e 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -299,7 +299,6 @@ <string name="settings_gestures_and_buttons_title">"Жесты и кнопки"</string> <string name="settings_save_front_page_scrolled_position_title">"Сохранять прокрученную позицию на «Главной»"</string> <string name="settings_save_front_page_scrolled_position_summary">"Просмотр новых постов после обновления на «Главной» (Заглавная страница, сортировка: лучшее)"</string> - <string name="settings_open_link_in_app_title">"Открыть ссылку в приложении"</string> <string name="settigns_video_title">"Видео"</string> <string name="settings_video_autoplay_title">"Автовоспроизведение видео"</string> <string name="settings_mute_autoplaying_videos_title">"Отключать звук у автовоспроизводящихся видео"</string> diff --git a/app/src/main/res/values-tr-rTR/strings.xml b/app/src/main/res/values-tr-rTR/strings.xml index 86ecfb0c..8a8684b5 100644 --- a/app/src/main/res/values-tr-rTR/strings.xml +++ b/app/src/main/res/values-tr-rTR/strings.xml @@ -300,7 +300,6 @@ Tekrar denemek için tıklayın."</string> <string name="settings_gestures_and_buttons_title">"İşaretler ve Düğmeler"</string> <string name="settings_save_front_page_scrolled_position_title">"Ana Sayfada Kaydırma Konumunu Kaydet"</string> <string name="settings_save_front_page_scrolled_position_summary">"Ana Sayfa yenilendikten sonra yeni gönderilere göz atın (Ön Sayfa, sıralama türü: En iyi)"</string> - <string name="settings_open_link_in_app_title">"Bağlantıları Uygulamada Aç"</string> <string name="settigns_video_title">"Video"</string> <string name="settings_video_autoplay_title">"Otomatik Video Oynatma"</string> <string name="settings_mute_autoplaying_videos_title">"Otomatik Oynatılan Videoları Sessize Al"</string> diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 50815bbc..5d12baaa 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -363,7 +363,6 @@ <string name="settings_gestures_and_buttons_title">Жести і кнопки</string> <string name="settings_save_front_page_scrolled_position_title">Зберігати позицію прокрутки в ДОМІВЦІ</string> <string name="settings_save_front_page_scrolled_position_summary">Оглядати нові дописи після оновлення ДОМІВКИ (Перша сторінка, тип сортування: Кращі)</string> - <string name="settings_open_link_in_app_title">Відкривати посилання в програмі</string> <string name="settigns_video_title">Відеозаписи</string> <string name="settings_video_autoplay_title">Автовідтворення відео</string> <string name="settings_mute_autoplaying_videos_title">Глушити автовідтворювані відео</string> diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index c6544cd8..04a938a6 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -300,7 +300,6 @@ Nhấn để thử lại."</string> <string name="settings_gestures_and_buttons_title">"Cử chỉ & Nút"</string> <string name="settings_save_front_page_scrolled_position_title">"Giữ vị trí cuộn trong Trang chủ"</string> <string name="settings_save_front_page_scrolled_position_summary">"Duyệt các bài viết mới sau khi làm mới trong TRANG CHỦ (Trang chính, loại sắp xếp: Hay nhất)"</string> - <string name="settings_open_link_in_app_title">"Mở liên kết trong ứng dụng"</string> <string name="settigns_video_title">"VIDEO"</string> <string name="settings_video_autoplay_title">"Tự động phát Video"</string> <string name="settings_mute_autoplaying_videos_title">"Tắt tiếng những Video tự động phát"</string> diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index e91f6e33..015ce71b 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -293,7 +293,6 @@ <string name="settings_gestures_and_buttons_title">"手势和按钮"</string> <string name="settings_save_front_page_scrolled_position_title">"在首页记住浏览的位置"</string> <string name="settings_save_front_page_scrolled_position_summary">"刷新首页浏览新帖(排序为精选)"</string> - <string name="settings_open_link_in_app_title">"在应用内打开网页"</string> <string name="settigns_video_title">"视频"</string> <string name="settings_video_autoplay_title">"自动播放视频"</string> <string name="settings_mute_autoplaying_videos_title">"静音自动播放的视频"</string> diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index ffe31f93..6f74d814 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -542,4 +542,16 @@ <item>200</item> </string-array> + <string-array name="link_handler"> + <item>@string/settings_link_handler_value_external_browser</item> + <item>@string/settings_link_handler_value_custom_tab</item> + <item>@string/settings_link_handler_value_internal_browser</item> + </string-array> + + <string-array name="link_handler_values"> + <item>0</item> + <item>1</item> + <item>2</item> + </string-array> + </resources> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f791a313..042fe4fa 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -365,7 +365,7 @@ <string name="settings_gestures_and_buttons_title">Gestures & Buttons</string> <string name="settings_save_front_page_scrolled_position_title">Save Scrolled Position in HOME</string> <string name="settings_save_front_page_scrolled_position_summary">Browse new posts after refreshing in HOME (Front Page, sort type: Best)</string> - <string name="settings_open_link_in_app_title">Open Link In App</string> + <string name="settings_link_handler_title">Link Handler</string> <string name="settigns_video_title">Video</string> <string name="settings_video_autoplay_title">Video Autoplay</string> <string name="settings_mute_autoplaying_videos_title">Mute Autoplaying Videos</string> @@ -610,6 +610,9 @@ <string name="settings_app_lock_timeout_title">App Lock Timeout</string> <string name="settings_enable_fold_support_title">Enable folding phone support</string> <string name="settings_default_playback_speed_title">Default Playback Speed</string> + <string name="settings_link_handler_value_external_browser">External Browser</string> + <string name="settings_link_handler_value_custom_tab">Custom Tab</string> + <string name="settings_link_handler_value_internal_browser">Internal Browser</string> <string name="no_link_available">Cannot get the link</string> @@ -1148,7 +1151,7 @@ <string name="exclude_user">Exclude this user</string> <string name="exclude_flair">Exclude this flair</string> <string name="contain_flair">Contain this flair</string> - <string name="exclude_domain">Exclude Domain</string> + <string name="exclude_domain">Exclude this domain</string> <string name="suggest_title">Suggest Title</string> <string name="suggest_title_failed">Failed to suggest a title</string> diff --git a/app/src/main/res/xml/miscellaneous_preferences.xml b/app/src/main/res/xml/miscellaneous_preferences.xml index 67a78aca..990513a0 100644 --- a/app/src/main/res/xml/miscellaneous_preferences.xml +++ b/app/src/main/res/xml/miscellaneous_preferences.xml @@ -7,11 +7,14 @@ app:title="@string/settings_save_front_page_scrolled_position_title" app:summary="@string/settings_save_front_page_scrolled_position_summary" /> - <SwitchPreference - app:defaultValue="false" + <ListPreference + app:defaultValue="0" + app:entries="@array/link_handler" + app:entryValues="@array/link_handler_values" app:icon="@drawable/ic_link" - app:key="open_link_in_app" - app:title="@string/settings_open_link_in_app_title" /> + app:key="link_handler" + app:title="@string/settings_link_handler_title" + app:useSimpleSummaryProvider="true" /> <ListPreference app:defaultValue="0" |