Skip to content

Commit 7de17ad

Browse files
committed
Icons for import/export
1 parent 7ab11a8 commit 7de17ad

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,8 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
143143
// -- Import --
144144
val importSubMenu = menu.addSubMenu(R.string.import_from)
145145

146-
addMenuItem(importSubMenu, R.string.previous_export) {
147-
onImportPreviousSelected()
148-
}
146+
addMenuItem(importSubMenu, R.string.previous_export) { onImportPreviousSelected() }
147+
.setIcon(R.drawable.ic_backup)
149148

150149
val services = requireContext().resources.getStringArray(R.array.service_list)
151150
for (serviceName in services) {
@@ -157,10 +156,10 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
157156
val supportedSources = subscriptionExtractor.supportedSources
158157
if (supportedSources.isEmpty()) continue
159158

160-
val item = addMenuItem(importSubMenu, serviceName) {
159+
addMenuItem(importSubMenu, serviceName) {
161160
onImportFromServiceSelected(service.serviceId)
162161
}
163-
item.setIcon(ServiceHelper.getIcon(service.serviceId))
162+
.setIcon(ServiceHelper.getIcon(service.serviceId))
164163
} catch (e: ExtractionException) {
165164
throw RuntimeException(
166165
"Services array contains an entry that it's not a valid service name ($serviceName)",
@@ -173,6 +172,7 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
173172
val exportSubMenu = menu.addSubMenu(R.string.export_to)
174173

175174
addMenuItem(exportSubMenu, R.string.file) { onExportSelected() }
175+
.setIcon(R.drawable.ic_save)
176176
}
177177

178178
private fun addMenuItem(

0 commit comments

Comments
 (0)