From 7de17ad9495dc7b827f499e7004844b70ee0fe9e Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Sun, 20 Mar 2022 17:32:41 +0100 Subject: [PATCH] Icons for import/export --- .../newpipe/local/subscription/SubscriptionFragment.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt index c0618b2b0..da025a543 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt @@ -143,9 +143,8 @@ class SubscriptionFragment : BaseStateFragment() { // -- Import -- val importSubMenu = menu.addSubMenu(R.string.import_from) - addMenuItem(importSubMenu, R.string.previous_export) { - onImportPreviousSelected() - } + addMenuItem(importSubMenu, R.string.previous_export) { onImportPreviousSelected() } + .setIcon(R.drawable.ic_backup) val services = requireContext().resources.getStringArray(R.array.service_list) for (serviceName in services) { @@ -157,10 +156,10 @@ class SubscriptionFragment : BaseStateFragment() { val supportedSources = subscriptionExtractor.supportedSources if (supportedSources.isEmpty()) continue - val item = addMenuItem(importSubMenu, serviceName) { + addMenuItem(importSubMenu, serviceName) { onImportFromServiceSelected(service.serviceId) } - item.setIcon(ServiceHelper.getIcon(service.serviceId)) + .setIcon(ServiceHelper.getIcon(service.serviceId)) } catch (e: ExtractionException) { throw RuntimeException( "Services array contains an entry that it's not a valid service name ($serviceName)", @@ -173,6 +172,7 @@ class SubscriptionFragment : BaseStateFragment() { val exportSubMenu = menu.addSubMenu(R.string.export_to) addMenuItem(exportSubMenu, R.string.file) { onExportSelected() } + .setIcon(R.drawable.ic_save) } private fun addMenuItem(