@@ -58,6 +58,7 @@ import org.schabi.newpipe.streams.io.NoFileManagerSafeGuard
5858import org.schabi.newpipe.streams.io.StoredFileHelper
5959import org.schabi.newpipe.util.NavigationHelper
6060import org.schabi.newpipe.util.OnClickGesture
61+ import org.schabi.newpipe.util.ServiceHelper
6162import org.schabi.newpipe.util.ThemeHelper.getGridSpanCountChannels
6263import org.schabi.newpipe.util.ThemeHelper.shouldUseGridLayout
6364import org.schabi.newpipe.util.external_communication.ShareUtils
@@ -140,7 +141,6 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
140141
141142 private fun buildImportExportMenu (menu : Menu ) {
142143 // -- Import --
143-
144144 val importSubMenu = menu.addSubMenu(R .string.import_from)
145145
146146 addMenuItem(importSubMenu, R .string.previous_export) {
@@ -157,9 +157,10 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
157157 val supportedSources = subscriptionExtractor.supportedSources
158158 if (supportedSources.isEmpty()) continue
159159
160- addMenuItem(importSubMenu, serviceName) {
160+ val item = addMenuItem(importSubMenu, serviceName) {
161161 onImportFromServiceSelected(service.serviceId)
162162 }
163+ item.setIcon(ServiceHelper .getIcon(service.serviceId))
163164 } catch (e: ExtractionException ) {
164165 throw RuntimeException (
165166 " Services array contains an entry that it's not a valid service name ($serviceName )" ,
@@ -169,7 +170,6 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
169170 }
170171
171172 // -- Export --
172-
173173 val exportSubMenu = menu.addSubMenu(R .string.export_to)
174174
175175 addMenuItem(exportSubMenu, R .string.file) { onExportSelected() }
0 commit comments