diff --git a/app/src/main/java/ani/dantotsu/MainActivity.kt b/app/src/main/java/ani/dantotsu/MainActivity.kt index 4681961a43..4a7bdc5e95 100644 --- a/app/src/main/java/ani/dantotsu/MainActivity.kt +++ b/app/src/main/java/ani/dantotsu/MainActivity.kt @@ -40,6 +40,7 @@ import ani.dantotsu.addons.torrent.TorrentAddonManager import ani.dantotsu.connections.anilist.Anilist import ani.dantotsu.connections.anilist.AnilistHomeViewModel import ani.dantotsu.databinding.ActivityMainBinding +import ani.dantotsu.databinding.DialogUserAgentBinding import ani.dantotsu.databinding.SplashScreenBinding import ani.dantotsu.home.AnimeFragment import ani.dantotsu.home.HomeFragment @@ -493,16 +494,14 @@ class MainActivity : AppCompatActivity() { val password = CharArray(16).apply { fill('0') } // Inflate the dialog layout - val dialogView = - LayoutInflater.from(this).inflate(R.layout.dialog_user_agent, null) - dialogView.findViewById(R.id.userAgentTextBox)?.hint = "Password" - val subtitleTextView = dialogView.findViewById(R.id.subtitle) - subtitleTextView?.visibility = View.VISIBLE - subtitleTextView?.text = getString(R.string.enter_password_to_decrypt_file) + val dialogView = DialogUserAgentBinding.inflate(layoutInflater) + dialogView.userAgentTextBox.hint = "Password" + dialogView.subtitle.visibility = View.VISIBLE + dialogView.subtitle.text = getString(R.string.enter_password_to_decrypt_file) val dialog = AlertDialog.Builder(this, R.style.MyPopup) .setTitle("Enter Password") - .setView(dialogView) + .setView(dialogView.root) .setPositiveButton("OK", null) .setNegativeButton("Cancel") { dialog, _ -> password.fill('0') diff --git a/app/src/main/java/ani/dantotsu/addons/download/AddonInstallReceiver.kt b/app/src/main/java/ani/dantotsu/addons/AddonInstallReceiver.kt similarity index 97% rename from app/src/main/java/ani/dantotsu/addons/download/AddonInstallReceiver.kt rename to app/src/main/java/ani/dantotsu/addons/AddonInstallReceiver.kt index 95ab27dec6..117ddf498b 100644 --- a/app/src/main/java/ani/dantotsu/addons/download/AddonInstallReceiver.kt +++ b/app/src/main/java/ani/dantotsu/addons/AddonInstallReceiver.kt @@ -1,11 +1,10 @@ -package ani.dantotsu.addons.download +package ani.dantotsu.addons import android.content.BroadcastReceiver import android.content.Context import android.content.Intent import androidx.core.content.ContextCompat -import ani.dantotsu.addons.AddonListener -import ani.dantotsu.addons.AddonLoader +import ani.dantotsu.addons.download.DownloadAddonManager import ani.dantotsu.addons.torrent.TorrentAddonManager import ani.dantotsu.media.AddonType import eu.kanade.tachiyomi.extension.util.ExtensionInstallReceiver diff --git a/app/src/main/java/ani/dantotsu/addons/download/DownloadAddonManager.kt b/app/src/main/java/ani/dantotsu/addons/download/DownloadAddonManager.kt index a136224d79..6c704f837f 100644 --- a/app/src/main/java/ani/dantotsu/addons/download/DownloadAddonManager.kt +++ b/app/src/main/java/ani/dantotsu/addons/download/DownloadAddonManager.kt @@ -5,6 +5,7 @@ import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import ani.dantotsu.R import ani.dantotsu.addons.AddonDownloader +import ani.dantotsu.addons.AddonInstallReceiver import ani.dantotsu.addons.AddonListener import ani.dantotsu.addons.AddonLoader import ani.dantotsu.addons.AddonManager diff --git a/app/src/main/java/ani/dantotsu/addons/torrent/TorrentAddonManager.kt b/app/src/main/java/ani/dantotsu/addons/torrent/TorrentAddonManager.kt index b716b7ba31..1dc7bfe572 100644 --- a/app/src/main/java/ani/dantotsu/addons/torrent/TorrentAddonManager.kt +++ b/app/src/main/java/ani/dantotsu/addons/torrent/TorrentAddonManager.kt @@ -10,7 +10,7 @@ import ani.dantotsu.addons.AddonListener import ani.dantotsu.addons.AddonLoader import ani.dantotsu.addons.AddonManager import ani.dantotsu.addons.LoadResult -import ani.dantotsu.addons.download.AddonInstallReceiver +import ani.dantotsu.addons.AddonInstallReceiver import ani.dantotsu.media.AddonType import ani.dantotsu.util.Logger import eu.kanade.tachiyomi.extension.InstallStep diff --git a/app/src/main/java/ani/dantotsu/media/anime/SelectorDialogFragment.kt b/app/src/main/java/ani/dantotsu/media/anime/SelectorDialogFragment.kt index 292b4470ac..737fc89860 100644 --- a/app/src/main/java/ani/dantotsu/media/anime/SelectorDialogFragment.kt +++ b/app/src/main/java/ani/dantotsu/media/anime/SelectorDialogFragment.kt @@ -24,6 +24,7 @@ import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import ani.dantotsu.BottomSheetDialogFragment import ani.dantotsu.R +import ani.dantotsu.addons.download.DownloadAddonManager import ani.dantotsu.addons.torrent.TorrentAddonManager import ani.dantotsu.connections.crashlytics.CrashlyticsInterface import ani.dantotsu.copyToClipboard @@ -48,6 +49,7 @@ import ani.dantotsu.setSafeOnClickListener import ani.dantotsu.settings.saving.PrefManager import ani.dantotsu.settings.saving.PrefName import ani.dantotsu.snackString +import ani.dantotsu.toast import ani.dantotsu.tryWith import ani.dantotsu.util.Logger import kotlinx.coroutines.CoroutineScope @@ -478,6 +480,11 @@ class SelectorDialogFragment : BottomSheetDialogFragment() { media!!.userPreferredName ) } else { + val downloadAddonManager: DownloadAddonManager = Injekt.get() + if (!downloadAddonManager.isAvailable()){ + toast("Download Extension not available") + return@setSafeOnClickListener + } val episode = media!!.anime!!.episodes!![media!!.anime!!.selectedEpisode!!]!! val selectedVideo = if (extractor.videos.size > episode.selectedVideo) extractor.videos[episode.selectedVideo] else null @@ -488,7 +495,7 @@ class SelectorDialogFragment : BottomSheetDialogFragment() { if (url.startsWith("magnet:") || url.endsWith(".torrent")) { val torrentExtension = Injekt.get() if (!torrentExtension.isAvailable()) { - snackString("Torrent Extension not available") + toast("Torrent Extension not available") return@setSafeOnClickListener } runBlocking { diff --git a/app/src/main/java/ani/dantotsu/settings/SettingsAddonActivity.kt b/app/src/main/java/ani/dantotsu/settings/SettingsAddonActivity.kt index f06651376c..fbb3e1bde8 100644 --- a/app/src/main/java/ani/dantotsu/settings/SettingsAddonActivity.kt +++ b/app/src/main/java/ani/dantotsu/settings/SettingsAddonActivity.kt @@ -61,7 +61,7 @@ class SettingsAddonActivity : AppCompatActivity() { type = 1, name = getString(R.string.anime_downloader_addon), desc = getString(R.string.not_installed), - icon = R.drawable.anim_play_to_pause, + icon = R.drawable.ic_download_24, isActivity = true, attach = { setStatus( @@ -85,7 +85,7 @@ class SettingsAddonActivity : AppCompatActivity() { it.settingsIconRight.setOnClickListener { _ -> if (it.settingsDesc.text == getString(R.string.installed)) { downloadAddonManager.uninstall() - return@setOnClickListener //uninstall logic here + return@setOnClickListener } else { job = Job() val scope = CoroutineScope(Dispatchers.Main + job) @@ -118,7 +118,7 @@ class SettingsAddonActivity : AppCompatActivity() { type = 1, name = getString(R.string.torrent_addon), desc = getString(R.string.not_installed), - icon = R.drawable.anim_play_to_pause, + icon = R.drawable.ic_round_magnet_24, isActivity = true, attach = { setStatus( @@ -176,15 +176,21 @@ class SettingsAddonActivity : AppCompatActivity() { Settings( type = 2, name = getString(R.string.enable_torrent), - desc = getString(R.string.enable_torrent), + desc = getString(R.string.enable_torrent_desc), icon = R.drawable.ic_round_dns_24, isChecked = PrefManager.getVal(PrefName.TorrentEnabled), - switch = { isChecked, _ -> + switch = { isChecked, it -> + if (isChecked && !torrentAddonManager.isAvailable()) { + snackString(getString(R.string.install_torrent_addon)) + it.settingsButton.isChecked = false + PrefManager.setVal(PrefName.TorrentEnabled, false) + return@Settings + } PrefManager.setVal(PrefName.TorrentEnabled, isChecked) Injekt.get().extension?.let { if (isChecked) { lifecycleScope.launchIO { - if (!ServerService.isRunning() && torrentAddonManager.isAvailable()) { + if (!ServerService.isRunning()) { ServerService.start() } } @@ -196,14 +202,13 @@ class SettingsAddonActivity : AppCompatActivity() { } } } - } + }, ) ) ) binding.settingsRecyclerView.layoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false) - } } diff --git a/app/src/main/java/ani/dantotsu/settings/SettingsAnimeActivity.kt b/app/src/main/java/ani/dantotsu/settings/SettingsAnimeActivity.kt index 6e137d47dd..2a5c6aeea1 100644 --- a/app/src/main/java/ani/dantotsu/settings/SettingsAnimeActivity.kt +++ b/app/src/main/java/ani/dantotsu/settings/SettingsAnimeActivity.kt @@ -44,7 +44,7 @@ class SettingsAnimeActivity : AppCompatActivity() { Settings( type = 1, name = getString(R.string.player_settings), - desc = getString(R.string.player_settings), + desc = getString(R.string.player_settings_desc), icon = R.drawable.ic_round_video_settings_24, onClick = { startActivity(Intent(context, PlayerSettingsActivity::class.java)) @@ -54,7 +54,7 @@ class SettingsAnimeActivity : AppCompatActivity() { Settings( type = 1, name = getString(R.string.purge_anime_downloads), - desc = getString(R.string.purge_anime_downloads), + desc = getString(R.string.purge_anime_downloads_desc), icon = R.drawable.ic_round_delete_24, onClick = { val dialog = AlertDialog.Builder(context, R.style.MyPopup) @@ -80,7 +80,7 @@ class SettingsAnimeActivity : AppCompatActivity() { Settings( type = 2, name = getString(R.string.prefer_dub), - desc = getString(R.string.prefer_dub), + desc = getString(R.string.prefer_dub_desc), icon = R.drawable.ic_round_audiotrack_24, isChecked = PrefManager.getVal(PrefName.SettingsPreferDub), switch = { isChecked, _ -> @@ -90,7 +90,7 @@ class SettingsAnimeActivity : AppCompatActivity() { Settings( type = 2, name = getString(R.string.show_yt), - desc = getString(R.string.show_yt), + desc = getString(R.string.show_yt_desc), icon = R.drawable.ic_round_play_circle_24, isChecked = PrefManager.getVal(PrefName.ShowYtButton), switch = { isChecked, _ -> @@ -100,7 +100,7 @@ class SettingsAnimeActivity : AppCompatActivity() { Settings( type = 2, name = getString(R.string.include_list), - desc = getString(R.string.include_list), + desc = getString(R.string.include_list_anime_desc), icon = R.drawable.view_list_24, isChecked = PrefManager.getVal(PrefName.IncludeAnimeList), switch = { isChecked, _ -> diff --git a/app/src/main/java/ani/dantotsu/settings/SettingsCommonActivity.kt b/app/src/main/java/ani/dantotsu/settings/SettingsCommonActivity.kt index 23ad67475e..4f8b1558ca 100644 --- a/app/src/main/java/ani/dantotsu/settings/SettingsCommonActivity.kt +++ b/app/src/main/java/ani/dantotsu/settings/SettingsCommonActivity.kt @@ -18,6 +18,7 @@ import androidx.recyclerview.widget.LinearLayoutManager import ani.dantotsu.R import ani.dantotsu.connections.anilist.Anilist import ani.dantotsu.databinding.ActivitySettingsCommonBinding +import ani.dantotsu.databinding.DialogUserAgentBinding import ani.dantotsu.download.DownloadsManager import ani.dantotsu.initActivity import ani.dantotsu.navBarHeight @@ -33,7 +34,6 @@ import ani.dantotsu.themes.ThemeManager import ani.dantotsu.toast import ani.dantotsu.util.LauncherWrapper import ani.dantotsu.util.StoragePermissions -import com.google.android.material.textfield.TextInputEditText import kotlinx.coroutines.DelicateCoroutinesApi import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.GlobalScope @@ -136,7 +136,7 @@ class SettingsCommonActivity : AppCompatActivity() { Settings( type = 1, name = getString(R.string.ui_settings), - desc = getString(R.string.ui_settings), + desc = getString(R.string.ui_settings_desc), icon = R.drawable.ic_round_auto_awesome_24, onClick = { startActivity( @@ -151,7 +151,7 @@ class SettingsCommonActivity : AppCompatActivity() { Settings( type = 1, name = getString(R.string.download_manager_select), - desc = getString(R.string.download_manager_select), + desc = getString(R.string.download_manager_select_desc), icon = R.drawable.ic_download_24, onClick = { val managers = arrayOf("Default", "1DM", "ADM") @@ -172,7 +172,7 @@ class SettingsCommonActivity : AppCompatActivity() { Settings( type = 1, name = getString(R.string.backup_restore), - desc = getString(R.string.backup_restore), + desc = getString(R.string.backup_restore_desc), icon = R.drawable.backup_restore, onClick = { StoragePermissions.downloadsPermission(context) @@ -227,7 +227,7 @@ class SettingsCommonActivity : AppCompatActivity() { Settings( type = 1, name = getString(R.string.change_download_location), - desc = getString(R.string.change_download_location), + desc = getString(R.string.change_download_location_desc), icon = R.drawable.ic_round_source_24, onClick = { val dialog = AlertDialog.Builder(context, R.style.MyPopup) @@ -267,7 +267,7 @@ class SettingsCommonActivity : AppCompatActivity() { Settings( type = 2, name = getString(R.string.always_continue_content), - desc = getString(R.string.always_continue_content), + desc = getString(R.string.always_continue_content_desc), icon = R.drawable.ic_round_delete_24, isChecked = PrefManager.getVal(PrefName.ContinueMedia), switch = { isChecked, _ -> @@ -277,7 +277,7 @@ class SettingsCommonActivity : AppCompatActivity() { Settings( type = 2, name = getString(R.string.search_source_list), - desc = getString(R.string.search_source_list), + desc = getString(R.string.search_source_list_desc), icon = R.drawable.ic_round_search_sources_24, isChecked = PrefManager.getVal(PrefName.SearchSources), switch = { isChecked, _ -> @@ -287,7 +287,7 @@ class SettingsCommonActivity : AppCompatActivity() { Settings( type = 2, name = getString(R.string.recentlyListOnly), - desc = getString(R.string.recentlyListOnly), + desc = getString(R.string.recentlyListOnly_desc), icon = R.drawable.ic_round_new_releases_24, isChecked = PrefManager.getVal(PrefName.RecentlyListOnly), switch = { isChecked, _ -> @@ -297,7 +297,7 @@ class SettingsCommonActivity : AppCompatActivity() { Settings( type = 2, name = getString(R.string.adult_only_content), - desc = getString(R.string.adult_only_content), + desc = getString(R.string.adult_only_content_desc), icon = R.drawable.ic_round_nsfw_24, isChecked = PrefManager.getVal(PrefName.AdultOnly), switch = { isChecked, _ -> @@ -347,14 +347,15 @@ class SettingsCommonActivity : AppCompatActivity() { val password = CharArray(16).apply { fill('0') } // Inflate the dialog layout - val dialogView = LayoutInflater.from(this).inflate(R.layout.dialog_user_agent, null) - val box = dialogView.findViewById(R.id.userAgentTextBox) - box?.hint = getString(R.string.password) - box?.setSingleLine() + val dialogView = DialogUserAgentBinding.inflate(layoutInflater) + val box = dialogView.userAgentTextBox + box.hint = getString(R.string.password) + box.setSingleLine() val dialog = AlertDialog.Builder(this, R.style.MyPopup).setTitle(getString(R.string.enter_password)) - .setView(dialogView).setPositiveButton(R.string.ok, null) + .setView(dialogView.root) + .setPositiveButton(R.string.ok, null) .setNegativeButton(R.string.cancel) { dialog, _ -> password.fill('0') dialog.dismiss() @@ -362,8 +363,8 @@ class SettingsCommonActivity : AppCompatActivity() { }.create() fun handleOkAction() { - val editText = dialog.findViewById(R.id.userAgentTextBox) - if (editText?.text?.isNotBlank() == true) { + val editText = dialogView.userAgentTextBox + if (editText.text?.isNotBlank() == true) { editText.text?.toString()?.trim()?.toCharArray(password) dialog.dismiss() callback(password) @@ -371,7 +372,7 @@ class SettingsCommonActivity : AppCompatActivity() { toast(getString(R.string.password_cannot_be_empty)) } } - box?.setOnEditorActionListener { _, actionId, _ -> + box.setOnEditorActionListener { _, actionId, _ -> if (actionId == EditorInfo.IME_ACTION_DONE) { handleOkAction() true @@ -379,9 +380,8 @@ class SettingsCommonActivity : AppCompatActivity() { false } } - val subtitleTextView = dialogView.findViewById(R.id.subtitle) - subtitleTextView?.visibility = View.VISIBLE - if (!isExporting) subtitleTextView?.text = + dialogView.subtitle.visibility = View.VISIBLE + if (!isExporting) dialogView.subtitle.text = getString(R.string.enter_password_to_decrypt_file) diff --git a/app/src/main/java/ani/dantotsu/settings/SettingsExtensionsActivity.kt b/app/src/main/java/ani/dantotsu/settings/SettingsExtensionsActivity.kt index 43f8efba7c..1f38a491d5 100644 --- a/app/src/main/java/ani/dantotsu/settings/SettingsExtensionsActivity.kt +++ b/app/src/main/java/ani/dantotsu/settings/SettingsExtensionsActivity.kt @@ -162,7 +162,7 @@ class SettingsExtensionsActivity : AppCompatActivity() { Settings( type = 1, name = getString(R.string.anime_add_repository), - desc = getString(R.string.anime_add_repository), + desc = getString(R.string.anime_add_repository_desc), icon = R.drawable.ic_github, onClick = { val dialogView = DialogUserAgentBinding.inflate(layoutInflater) @@ -198,7 +198,7 @@ class SettingsExtensionsActivity : AppCompatActivity() { Settings( type = 1, name = getString(R.string.manga_add_repository), - desc = getString(R.string.manga_add_repository), + desc = getString(R.string.manga_add_repository_desc), icon = R.drawable.ic_github, onClick = { val dialogView = DialogUserAgentBinding.inflate(layoutInflater) @@ -234,7 +234,7 @@ class SettingsExtensionsActivity : AppCompatActivity() { Settings( type = 1, name = getString(R.string.user_agent), - desc = getString(R.string.NSFWExtention), + desc = getString(R.string.user_agent_desc), icon = R.drawable.ic_round_video_settings_24, onClick = { val dialogView = DialogUserAgentBinding.inflate(layoutInflater) @@ -263,7 +263,7 @@ class SettingsExtensionsActivity : AppCompatActivity() { Settings( type = 2, name = getString(R.string.force_legacy_installer), - desc = getString(R.string.force_legacy_installer), + desc = getString(R.string.force_legacy_installer_desc), icon = R.drawable.ic_round_new_releases_24, isChecked = extensionInstaller.get() == BasePreferences.ExtensionInstaller.LEGACY, switch = { isChecked, _ -> @@ -278,7 +278,7 @@ class SettingsExtensionsActivity : AppCompatActivity() { Settings( type = 2, name = getString(R.string.skip_loading_extension_icons), - desc = getString(R.string.skip_loading_extension_icons), + desc = getString(R.string.skip_loading_extension_icons_desc), icon = R.drawable.ic_round_no_icon_24, isChecked = PrefManager.getVal(PrefName.SkipExtensionIcons), switch = { isChecked, _ -> @@ -288,7 +288,7 @@ class SettingsExtensionsActivity : AppCompatActivity() { Settings( type = 2, name = getString(R.string.NSFWExtention), - desc = getString(R.string.NSFWExtention), + desc = getString(R.string.NSFWExtention_desc), icon = R.drawable.ic_round_nsfw_24, isChecked = PrefManager.getVal(PrefName.NSFWExtension), switch = { isChecked, _ -> diff --git a/app/src/main/java/ani/dantotsu/settings/SettingsMangaActivity.kt b/app/src/main/java/ani/dantotsu/settings/SettingsMangaActivity.kt index 9b485ea677..7322f3ef9d 100644 --- a/app/src/main/java/ani/dantotsu/settings/SettingsMangaActivity.kt +++ b/app/src/main/java/ani/dantotsu/settings/SettingsMangaActivity.kt @@ -67,7 +67,7 @@ class SettingsMangaActivity : AppCompatActivity() { Settings( type = 1, name = getString(R.string.reader_settings), - desc = getString(R.string.reader_settings), + desc = getString(R.string.reader_settings_desc), icon = R.drawable.ic_round_reader_settings, onClick = { startActivity(Intent(context, ReaderSettingsActivity::class.java)) @@ -77,7 +77,7 @@ class SettingsMangaActivity : AppCompatActivity() { Settings( type = 1, name = getString(R.string.purge_manga_downloads), - desc = getString(R.string.purge_manga_downloads), + desc = getString(R.string.purge_manga_downloads_desc), icon = R.drawable.ic_round_delete_24, onClick = { val dialog = AlertDialog.Builder(context, R.style.MyPopup) @@ -103,7 +103,7 @@ class SettingsMangaActivity : AppCompatActivity() { Settings( type = 1, name = getString(R.string.purge_novel_downloads), - desc = getString(R.string.purge_novel_downloads), + desc = getString(R.string.purge_novel_downloads_desc), icon = R.drawable.ic_round_delete_24, onClick = { val dialog = AlertDialog.Builder(context, R.style.MyPopup) @@ -128,7 +128,7 @@ class SettingsMangaActivity : AppCompatActivity() { Settings( type = 2, name = getString(R.string.include_list), - desc = getString(R.string.include_list), + desc = getString(R.string.include_list_desc), icon = R.drawable.view_list_24, isChecked = PrefManager.getVal(PrefName.IncludeMangaList), switch = { isChecked, _ -> diff --git a/app/src/main/java/ani/dantotsu/settings/SettingsNotificationActivity.kt b/app/src/main/java/ani/dantotsu/settings/SettingsNotificationActivity.kt index edeb23e3f8..75659b9919 100644 --- a/app/src/main/java/ani/dantotsu/settings/SettingsNotificationActivity.kt +++ b/app/src/main/java/ani/dantotsu/settings/SettingsNotificationActivity.kt @@ -105,7 +105,7 @@ class SettingsNotificationActivity : AppCompatActivity() { Settings( type = 1, name = getString(R.string.anilist_notification_filters), - desc = getString(R.string.anilist_notification_filters), + desc = getString(R.string.anilist_notification_filters_desc), icon = R.drawable.ic_anilist, onClick = { val types = NotificationType.entries.map { it.name } @@ -138,10 +138,7 @@ class SettingsNotificationActivity : AppCompatActivity() { R.string.anilist_notifications_checking_time, aItems[PrefManager.getVal(PrefName.AnilistNotificationInterval)] ), - desc = getString( - R.string.anilist_notifications_checking_time, - aItems[PrefManager.getVal(PrefName.AnilistNotificationInterval)] - ), + desc = getString(R.string.anilist_notifications_checking_time_desc), icon = R.drawable.ic_round_notifications_none_24, onClick = { val selected = @@ -173,10 +170,7 @@ class SettingsNotificationActivity : AppCompatActivity() { R.string.comment_notification_checking_time, cItems[PrefManager.getVal(PrefName.CommentNotificationInterval)] ), - desc = getString( - R.string.comment_notification_checking_time, - cItems[PrefManager.getVal(PrefName.CommentNotificationInterval)] - ), + desc = getString(R.string.comment_notification_checking_time_desc), icon = R.drawable.ic_round_notifications_none_24, onClick = { val selected = @@ -205,7 +199,7 @@ class SettingsNotificationActivity : AppCompatActivity() { Settings( type = 2, name = getString(R.string.notification_for_checking_subscriptions), - desc = getString(R.string.notification_for_checking_subscriptions), + desc = getString(R.string.notification_for_checking_subscriptions_desc), icon = R.drawable.ic_round_smart_button_24, isChecked = PrefManager.getVal(PrefName.SubscriptionCheckingNotifications), switch = { isChecked, _ -> @@ -221,7 +215,7 @@ class SettingsNotificationActivity : AppCompatActivity() { Settings( type = 2, name = getString(R.string.use_alarm_manager_reliable), - desc = getString(R.string.use_alarm_manager_reliable), + desc = getString(R.string.use_alarm_manager_reliable_desc), icon = R.drawable.ic_anilist, isChecked = PrefManager.getVal(PrefName.UseAlarmManager), switch = { isChecked, view -> diff --git a/app/src/main/java/ani/dantotsu/settings/SettingsThemeActivity.kt b/app/src/main/java/ani/dantotsu/settings/SettingsThemeActivity.kt index 308cc82bbd..e58eea0b28 100644 --- a/app/src/main/java/ani/dantotsu/settings/SettingsThemeActivity.kt +++ b/app/src/main/java/ani/dantotsu/settings/SettingsThemeActivity.kt @@ -112,7 +112,7 @@ class SettingsThemeActivity : AppCompatActivity(), SimpleDialog.OnDialogResultLi Settings( type = 2, name = getString(R.string.oled_theme_variant), - desc = getString(R.string.oled_theme_variant), + desc = getString(R.string.oled_theme_variant_desc), icon = R.drawable.ic_round_brightness_4_24, isChecked = PrefManager.getVal(PrefName.UseOLED), switch = { isChecked, _ -> @@ -123,7 +123,7 @@ class SettingsThemeActivity : AppCompatActivity(), SimpleDialog.OnDialogResultLi Settings( type = 2, name = getString(R.string.use_material_you), - desc = getString(R.string.use_material_you), + desc = getString(R.string.use_material_you_desc), icon = R.drawable.ic_round_new_releases_24, isChecked = PrefManager.getVal(PrefName.UseMaterialYou), switch = { isChecked, _ -> @@ -136,7 +136,7 @@ class SettingsThemeActivity : AppCompatActivity(), SimpleDialog.OnDialogResultLi Settings( type = 2, name = getString(R.string.use_unique_theme_for_each_item), - desc = getString(R.string.use_unique_theme_for_each_item), + desc = getString(R.string.use_unique_theme_for_each_item_desc), icon = R.drawable.ic_palette, isChecked = PrefManager.getVal(PrefName.UseSourceTheme), switch = { isChecked, _ -> @@ -147,7 +147,7 @@ class SettingsThemeActivity : AppCompatActivity(), SimpleDialog.OnDialogResultLi Settings( type = 2, name = getString(R.string.use_custom_theme), - desc = getString(R.string.use_custom_theme), + desc = getString(R.string.use_custom_theme_desc), icon = R.drawable.ic_palette, isChecked = PrefManager.getVal(PrefName.UseCustomTheme), switch = { isChecked, _ -> @@ -160,7 +160,7 @@ class SettingsThemeActivity : AppCompatActivity(), SimpleDialog.OnDialogResultLi Settings( type = 1, name = getString(R.string.color_picker), - desc = getString(R.string.color_picker), + desc = getString(R.string.color_picker_desc), icon = R.drawable.ic_palette, onClick = { val originalColor: Int = PrefManager.getVal(PrefName.CustomThemeInt) diff --git a/app/src/main/res/drawable/ic_round_magnet_24.xml b/app/src/main/res/drawable/ic_round_magnet_24.xml new file mode 100644 index 0000000000..e3423f18be --- /dev/null +++ b/app/src/main/res/drawable/ic_round_magnet_24.xml @@ -0,0 +1,12 @@ + + + + + diff --git a/app/src/main/res/layout/activity_settings_addons.xml b/app/src/main/res/layout/activity_settings_addons.xml index 9374ed0334..8c1ab76627 100644 --- a/app/src/main/res/layout/activity_settings_addons.xml +++ b/app/src/main/res/layout/activity_settings_addons.xml @@ -66,7 +66,7 @@ android:layout_marginHorizontal="24dp" android:nestedScrollingEnabled="false" android:requiresFadingEdge="vertical" - tools:itemCount="1" + tools:itemCount="5" tools:listitem="@layout/item_settings" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index efa0502e7c..fab4b7d135 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -188,7 +188,7 @@ No SD card was Found. Reader Settings Default Source - Show Youtube Link + Youtube Link Default Episode Layout Default Chapter Layout User Interface @@ -404,7 +404,7 @@ \n\n_It is not required to sync both MAL and Anilist accounts._ - Show notification for Checking Subscriptions + Checking Subscriptions notification Use Alarm Manager Use Alarm Manager for reliable Notifications Using Alarm Manger can help fight against battery optimization, but may consume more battery. It also requires the Alarm Manager permission. @@ -793,7 +793,7 @@ Non quae tempore quo provident laudantium qui illo dolor vel quia dolor et exerc Blur Hide Scroll Bar View on AniList - Choose category to ignore + Filter Notifications Anilist notifications update frequency : %1$s Comment notifications update frequency : %1$s Activities @@ -912,9 +912,44 @@ Non quae tempore quo provident laudantium qui illo dolor vel quia dolor et exerc Dantotsu\'s very own unpaid labours More like Dantotsu Something to keep in mind + This will run a torrent server in the background + All the player related settings + Delete all downloaded Anime + Select Dub media by default + Show YouTube links for supported media + Include list items in Anime explore page + All the UI related settings + Default manager to download Anime + Your preferred settings everywhere + Change the location where all the downloaded stuff goes + Continue where you left off + Auto-select the next server if the previous server doesn\'t have the media + Show only your list items in the recent tab + Show only adult content in the explore page + Add Anime Extensions from various sources + Add Manga Extensions from various sources + Change your default user agent + Use the legacy installer to install extensions (For older android phones) + Don\'t load icons of extensions on the extension page + Remove 18+ extensions from search (May remove some useful extensions) + All the Reader related settings + Delete all downloaded Manga + Delete all downloaded Novels + Include list items in Manga explore page + Choose category to Ignore + Set the frequency you want the app to check for Anilist notifications + Set the frequency you want the app to check for Comment notifications + Show notification for checking Subscriptions + Use to bypass the phone\'s battery optimizer + As dark as it gets + Use the same color as your wallpaper + Use color from media\'s banner + Use your own color for the theme + Choose a color Torrent Addon Enable torrent Anime Downloader Addon + Install Torrent Addon Loaded Successfully Not Installed Torrent extension not supported on this device