@@ -51,7 +51,7 @@ import me.devsaki.hentoid.enums.Grouping
5151import me.devsaki.hentoid.events.AppUpdatedEvent
5252import me.devsaki.hentoid.events.CommunicationEvent
5353import me.devsaki.hentoid.events.ProcessEvent
54- import me.devsaki.hentoid.fragments.library.LibraryArchiveDialogFragment
54+ import me.devsaki.hentoid.fragments.library.LibraryExportDialogFragment
5555import me.devsaki.hentoid.fragments.library.LibraryBottomSortFilterFragment
5656import me.devsaki.hentoid.fragments.library.LibraryContentFragment
5757import me.devsaki.hentoid.fragments.library.LibraryFoldersFragment
@@ -95,7 +95,7 @@ private const val BEHOLDER_DELAY_MS = 2 * 60 * 1000 // 2 min
9595var hasChangedGridDisplay = false
9696var hasClosedTopAlert = false
9797
98- class LibraryActivity : BaseActivity (), LibraryArchiveDialogFragment .Parent {
98+ class LibraryActivity : BaseActivity (), LibraryExportDialogFragment .Parent {
9999
100100 // ======== COMMUNICATION
101101 // Viewmodel
@@ -141,12 +141,11 @@ class LibraryActivity : BaseActivity(), LibraryArchiveDialogFragment.Parent {
141141 private var resetReadStatsMenu: MenuItem ? = null
142142 private var rateMenu: MenuItem ? = null
143143 private var shareMenu: MenuItem ? = null
144- private var archiveMenu : MenuItem ? = null
144+ private var exportMenu : MenuItem ? = null
145145 private var changeGroupMenu: MenuItem ? = null
146146 private var folderMenu: MenuItem ? = null
147147 private var redownloadMenu: MenuItem ? = null
148- private var downloadStreamedMenu: MenuItem ? = null
149- private var streamMenu: MenuItem ? = null
148+ private var storageMethodMenu: MenuItem ? = null
150149 private var groupCoverMenu: MenuItem ? = null
151150 private var mergeMenu: MenuItem ? = null
152151 private var splitMenu: MenuItem ? = null
@@ -297,6 +296,7 @@ class LibraryActivity : BaseActivity(), LibraryArchiveDialogFragment.Parent {
297296 if (! EventBus .getDefault().isRegistered(this )) EventBus .getDefault().register(this )
298297 }
299298
299+ @Suppress(" unused" )
300300 @Subscribe(sticky = true , threadMode = ThreadMode .MAIN )
301301 fun onAppUpdated (event : AppUpdatedEvent ) {
302302 EventBus .getDefault().removeStickyEvent(event)
@@ -850,12 +850,11 @@ class LibraryActivity : BaseActivity(), LibraryArchiveDialogFragment.Parent {
850850 resetReadStatsMenu = findItem(R .id.action_reset_read)
851851 rateMenu = findItem(R .id.action_rate)
852852 shareMenu = findItem(R .id.action_share)
853- archiveMenu = findItem(R .id.action_archive )
853+ exportMenu = findItem(R .id.action_export )
854854 changeGroupMenu = findItem(R .id.action_change_group)
855855 folderMenu = findItem(R .id.action_open_folder)
856856 redownloadMenu = findItem(R .id.action_redownload)
857- downloadStreamedMenu = findItem(R .id.action_download)
858- streamMenu = findItem(R .id.action_stream)
857+ storageMethodMenu = findItem(R .id.action_storage_method)
859858 groupCoverMenu = findItem(R .id.action_set_group_cover)
860859 mergeMenu = findItem(R .id.action_merge)
861860 splitMenu = findItem(R .id.action_split)
@@ -1108,12 +1107,11 @@ class LibraryActivity : BaseActivity(), LibraryArchiveDialogFragment.Parent {
11081107 completedMenu?.isVisible = false
11091108 resetReadStatsMenu?.isVisible = false
11101109 rateMenu?.isVisible = isMultipleSelection
1111- archiveMenu ?.isVisible = ! hasProcessed
1110+ exportMenu ?.isVisible = ! hasProcessed
11121111 changeGroupMenu?.isVisible = false
11131112 folderMenu?.isVisible = false
11141113 redownloadMenu?.isVisible = false
1115- downloadStreamedMenu?.isVisible = false
1116- streamMenu?.isVisible = false
1114+ storageMethodMenu?.isVisible = false
11171115 groupCoverMenu?.isVisible = false
11181116 mergeMenu?.isVisible = false
11191117 splitMenu?.isVisible = false
@@ -1130,12 +1128,11 @@ class LibraryActivity : BaseActivity(), LibraryArchiveDialogFragment.Parent {
11301128 completedMenu?.isVisible = false
11311129 resetReadStatsMenu?.isVisible = false
11321130 rateMenu?.isVisible = false
1133- archiveMenu ?.isVisible = false
1131+ exportMenu ?.isVisible = false
11341132 changeGroupMenu?.isVisible = false
11351133 folderMenu?.isVisible = 1 == selectedTotalCount
11361134 redownloadMenu?.isVisible = false
1137- downloadStreamedMenu?.isVisible = false
1138- streamMenu?.isVisible = false
1135+ storageMethodMenu?.isVisible = false
11391136 groupCoverMenu?.isVisible = false
11401137 mergeMenu?.isVisible = false
11411138 splitMenu?.isVisible = false
@@ -1151,12 +1148,11 @@ class LibraryActivity : BaseActivity(), LibraryArchiveDialogFragment.Parent {
11511148 resetReadStatsMenu?.isVisible = true
11521149 rateMenu?.isVisible = isMultipleSelection
11531150 shareMenu?.isVisible = true
1154- archiveMenu ?.isVisible = ! hasProcessed
1151+ exportMenu ?.isVisible = ! hasProcessed
11551152 changeGroupMenu?.isVisible = ! hasProcessed
11561153 folderMenu?.isVisible = ! isMultipleSelection
11571154 redownloadMenu?.isVisible = ! hasProcessed && selectedDownloadedCount > 0
1158- downloadStreamedMenu?.isVisible = ! hasProcessed && selectedStreamedCount > 0
1159- streamMenu?.isVisible = ! hasProcessed && selectedDownloadedCount > 0
1155+ storageMethodMenu?.isVisible = ! hasProcessed
11601156 groupCoverMenu?.isVisible =
11611157 ! isMultipleSelection && Settings .getGroupingDisplayG() != Grouping .FLAT
11621158 // Can only merge downloaded, streamed or non-archive external content together
@@ -1204,15 +1200,17 @@ class LibraryActivity : BaseActivity(), LibraryArchiveDialogFragment.Parent {
12041200 }
12051201 }
12061202
1203+ @Suppress(" unused" )
12071204 @Subscribe(threadMode = ThreadMode .MAIN )
12081205 fun onProcessEvent (event : ProcessEvent ) {
12091206 if (R .id.delete_service_delete == event.processId
12101207 && ProcessEvent .Type .COMPLETE == event.eventType
12111208 ) processDeleteEvent(event)
12121209 }
12131210
1211+ @Suppress(" unused" )
12141212 @Subscribe(sticky = true , threadMode = ThreadMode .MAIN )
1215- fun onProcesStickyEvent (event : ProcessEvent ) {
1213+ fun onProcessStickyEvent (event : ProcessEvent ) {
12161214 var canRemove = false
12171215 if (R .id.delete_service_delete == event.processId
12181216 && ProcessEvent .Type .COMPLETE == event.eventType
@@ -1247,21 +1245,21 @@ class LibraryActivity : BaseActivity(), LibraryArchiveDialogFragment.Parent {
12471245 }
12481246
12491247 /* *
1250- * Display the yes/no dialog to make sure the user really wants to archive selected items
1248+ * Display the yes/no dialog to make sure the user really wants to export selected items
12511249 *
1252- * @param items Items to be archived if the answer is yes
1250+ * @param items Items to be exported if the answer is yes
12531251 */
1254- fun askArchiveItems (items : List <Content >, selectExtension : SelectExtension <* >) {
1252+ fun askExportItems (items : List <Content >, selectExtension : SelectExtension <* >) {
12551253 if (items.size > 1000 ) {
1256- snack(R .string.archive_limit )
1254+ snack(R .string.process_limit )
12571255 return
12581256 }
12591257 if (items.isEmpty()) {
12601258 snack(R .string.invalid_selection_generic)
12611259 return
12621260 }
12631261 selectExtension.deselect(selectExtension.selections.toMutableSet())
1264- LibraryArchiveDialogFragment .invoke(this , items)
1262+ LibraryExportDialogFragment .invoke(this , items)
12651263 }
12661264
12671265 override fun leaveSelectionMode () {
0 commit comments