mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-12 12:08:56 +01:00
Use Stable interface for Updates screen + Cleanup (#7627)
* Use Stable interface for Updates screen + Cleanup Co-Authored-By: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com> * Disable swipe refresh in selection mode * Review Changes Co-Authored-By: Andreas <6576096+ghostbear@users.noreply.github.com> * Review Changes 2 Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com> Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package eu.kanade.presentation.updates
|
||||
|
||||
import androidx.compose.material3.AlertDialog
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TextButton
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import eu.kanade.tachiyomi.R
|
||||
|
||||
@Composable
|
||||
fun UpdatesDeleteConfirmationDialog(
|
||||
onDismissRequest: () -> Unit,
|
||||
onConfirm: () -> Unit,
|
||||
) {
|
||||
AlertDialog(
|
||||
text = {
|
||||
Text(text = stringResource(R.string.confirm_delete_chapters))
|
||||
},
|
||||
onDismissRequest = onDismissRequest,
|
||||
confirmButton = {
|
||||
TextButton(onClick = {
|
||||
onConfirm()
|
||||
onDismissRequest()
|
||||
},) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
TextButton(onClick = onDismissRequest) {
|
||||
Text(text = stringResource(android.R.string.cancel))
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package eu.kanade.presentation.updates
|
||||
|
||||
import androidx.activity.compose.BackHandler
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.WindowInsets
|
||||
import androidx.compose.foundation.layout.WindowInsetsSides
|
||||
import androidx.compose.foundation.layout.asPaddingValues
|
||||
@@ -20,9 +21,9 @@ import androidx.compose.material.icons.filled.SelectAll
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.toMutableStateList
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.LocalLayoutDirection
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import com.google.accompanist.swiperefresh.SwipeRefresh
|
||||
@@ -38,97 +39,78 @@ import eu.kanade.presentation.util.bottomNavPaddingValues
|
||||
import eu.kanade.presentation.util.plus
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.download.model.Download
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
import eu.kanade.tachiyomi.data.library.LibraryUpdateService
|
||||
import eu.kanade.tachiyomi.ui.reader.ReaderActivity
|
||||
import eu.kanade.tachiyomi.ui.recent.updates.UpdatesItem
|
||||
import eu.kanade.tachiyomi.ui.recent.updates.UpdatesState
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import java.text.DateFormat
|
||||
import eu.kanade.tachiyomi.ui.recent.updates.UpdatesPresenter
|
||||
import eu.kanade.tachiyomi.ui.recent.updates.UpdatesPresenter.Dialog
|
||||
import eu.kanade.tachiyomi.ui.recent.updates.UpdatesPresenter.Event
|
||||
import eu.kanade.tachiyomi.util.system.toast
|
||||
import kotlinx.coroutines.flow.collectLatest
|
||||
import java.util.Date
|
||||
|
||||
@Composable
|
||||
fun UpdateScreen(
|
||||
state: UpdatesState.Success,
|
||||
presenter: UpdatesPresenter,
|
||||
onClickCover: (UpdatesItem) -> Unit,
|
||||
onClickUpdate: (UpdatesItem) -> Unit,
|
||||
onDownloadChapter: (List<UpdatesItem>, ChapterDownloadAction) -> Unit,
|
||||
onUpdateLibrary: () -> Unit,
|
||||
onBackClicked: () -> Unit,
|
||||
// For bottom action menu
|
||||
onMultiBookmarkClicked: (List<UpdatesItem>, bookmark: Boolean) -> Unit,
|
||||
onMultiMarkAsReadClicked: (List<UpdatesItem>, read: Boolean) -> Unit,
|
||||
onMultiDeleteClicked: (List<UpdatesItem>) -> Unit,
|
||||
// Miscellaneous
|
||||
preferences: PreferencesHelper = Injekt.get(),
|
||||
onDownloadChapter: (List<UpdatesItem>, ChapterDownloadAction) -> Unit,
|
||||
) {
|
||||
val updatesListState = rememberLazyListState()
|
||||
val insetPaddingValue = WindowInsets.systemBars.only(WindowInsetsSides.Horizontal).asPaddingValues()
|
||||
|
||||
val relativeTime: Int = remember { preferences.relativeTime().get() }
|
||||
val dateFormat: DateFormat = remember { preferences.dateFormat() }
|
||||
|
||||
val uiModels = remember(state) {
|
||||
state.uiModels
|
||||
}
|
||||
val itemUiModels = remember(uiModels) {
|
||||
uiModels.filterIsInstance<UpdatesUiModel.Item>()
|
||||
}
|
||||
// To prevent selection from getting removed during an update to a item in list
|
||||
val updateIdList = remember(itemUiModels) {
|
||||
itemUiModels.map { it.item.update.chapterId }
|
||||
}
|
||||
val selected = remember(updateIdList) {
|
||||
emptyList<UpdatesUiModel.Item>().toMutableStateList()
|
||||
}
|
||||
// First and last selected index in list
|
||||
val selectedPositions = remember(uiModels) { arrayOf(-1, -1) }
|
||||
|
||||
val internalOnBackPressed = {
|
||||
if (selected.isNotEmpty()) {
|
||||
selected.clear()
|
||||
if (presenter.selectionMode) {
|
||||
presenter.toggleAllSelection(false)
|
||||
} else {
|
||||
onBackClicked()
|
||||
}
|
||||
}
|
||||
BackHandler(onBack = internalOnBackPressed)
|
||||
|
||||
val context = LocalContext.current
|
||||
|
||||
val onUpdateLibrary = {
|
||||
if (LibraryUpdateService.start(context)) {
|
||||
context.toast(R.string.updating_library)
|
||||
}
|
||||
}
|
||||
|
||||
Scaffold(
|
||||
modifier = Modifier
|
||||
.padding(insetPaddingValue),
|
||||
topBar = {
|
||||
UpdatesAppBar(
|
||||
selected = selected,
|
||||
incognitoMode = state.isIncognitoMode,
|
||||
downloadedOnlyMode = state.isDownloadedOnlyMode,
|
||||
incognitoMode = presenter.isIncognitoMode,
|
||||
downloadedOnlyMode = presenter.isDownloadOnly,
|
||||
onUpdateLibrary = onUpdateLibrary,
|
||||
actionModeCounter = selected.size,
|
||||
onSelectAll = {
|
||||
selected.clear()
|
||||
selected.addAll(itemUiModels)
|
||||
},
|
||||
onInvertSelection = {
|
||||
val toSelect = itemUiModels - selected
|
||||
selected.clear()
|
||||
selected.addAll(toSelect)
|
||||
},
|
||||
actionModeCounter = presenter.selected.size,
|
||||
onSelectAll = { presenter.toggleAllSelection(true) },
|
||||
onInvertSelection = { presenter.invertSelection() },
|
||||
onCancelActionMode = { presenter.toggleAllSelection(false) },
|
||||
)
|
||||
},
|
||||
bottomBar = {
|
||||
UpdatesBottomBar(
|
||||
selected = selected,
|
||||
selected = presenter.selected,
|
||||
onDownloadChapter = onDownloadChapter,
|
||||
onMultiBookmarkClicked = onMultiBookmarkClicked,
|
||||
onMultiMarkAsReadClicked = onMultiMarkAsReadClicked,
|
||||
onMultiDeleteClicked = onMultiDeleteClicked,
|
||||
onMultiBookmarkClicked = presenter::bookmarkUpdates,
|
||||
onMultiMarkAsReadClicked = presenter::markUpdatesRead,
|
||||
onMultiDeleteClicked = {
|
||||
val updateItems = presenter.selected.map { it.item }
|
||||
presenter.dialog = Dialog.DeleteConfirmation(updateItems)
|
||||
},
|
||||
)
|
||||
},
|
||||
) { contentPadding ->
|
||||
val contentPaddingWithNavBar = bottomNavPaddingValues + contentPadding +
|
||||
WindowInsets.navigationBars.only(WindowInsetsSides.Bottom).asPaddingValues()
|
||||
// During selection mode bottom nav is not visible
|
||||
val contentPaddingWithNavBar = (if (presenter.selectionMode) PaddingValues() else bottomNavPaddingValues) +
|
||||
contentPadding + WindowInsets.navigationBars.only(WindowInsetsSides.Bottom).asPaddingValues()
|
||||
|
||||
SwipeRefresh(
|
||||
state = rememberSwipeRefreshState(state.showSwipeRefreshIndicator),
|
||||
state = rememberSwipeRefreshState(isRefreshing = false),
|
||||
onRefresh = onUpdateLibrary,
|
||||
swipeEnabled = presenter.selectionMode.not(),
|
||||
indicatorPadding = contentPaddingWithNavBar,
|
||||
indicator = { s, trigger ->
|
||||
SwipeRefreshIndicator(
|
||||
@@ -137,7 +119,7 @@ fun UpdateScreen(
|
||||
)
|
||||
},
|
||||
) {
|
||||
if (uiModels.isEmpty()) {
|
||||
if (presenter.uiModels.isEmpty()) {
|
||||
EmptyScreen(textResource = R.string.information_no_recent)
|
||||
} else {
|
||||
VerticalFastScroller(
|
||||
@@ -152,27 +134,49 @@ fun UpdateScreen(
|
||||
contentPadding = contentPaddingWithNavBar,
|
||||
) {
|
||||
updatesUiItems(
|
||||
uiModels = uiModels,
|
||||
itemUiModels = itemUiModels,
|
||||
selected = selected,
|
||||
selectedPositions = selectedPositions,
|
||||
uiModels = presenter.uiModels,
|
||||
selectionMode = presenter.selectionMode,
|
||||
onUpdateSelected = presenter::toggleSelection,
|
||||
onClickCover = onClickCover,
|
||||
onClickUpdate = onClickUpdate,
|
||||
onClickUpdate = {
|
||||
val intent = ReaderActivity.newIntent(context, it.update.mangaId, it.update.chapterId)
|
||||
context.startActivity(intent)
|
||||
},
|
||||
onDownloadChapter = onDownloadChapter,
|
||||
relativeTime = relativeTime,
|
||||
dateFormat = dateFormat,
|
||||
relativeTime = presenter.relativeTime,
|
||||
dateFormat = presenter.dateFormat,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val onDismissDialog = { presenter.dialog = null }
|
||||
when (val dialog = presenter.dialog) {
|
||||
is Dialog.DeleteConfirmation -> {
|
||||
UpdatesDeleteConfirmationDialog(
|
||||
onDismissRequest = onDismissDialog,
|
||||
onConfirm = {
|
||||
presenter.deleteChapters(dialog.toDelete)
|
||||
presenter.toggleAllSelection(false)
|
||||
},
|
||||
)
|
||||
}
|
||||
null -> {}
|
||||
}
|
||||
LaunchedEffect(Unit) {
|
||||
presenter.events.collectLatest { event ->
|
||||
when (event) {
|
||||
Event.InternalError -> context.toast(R.string.internal_error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun UpdatesAppBar(
|
||||
modifier: Modifier = Modifier,
|
||||
selected: MutableList<UpdatesUiModel.Item>,
|
||||
incognitoMode: Boolean,
|
||||
downloadedOnlyMode: Boolean,
|
||||
onUpdateLibrary: () -> Unit,
|
||||
@@ -180,6 +184,7 @@ fun UpdatesAppBar(
|
||||
actionModeCounter: Int,
|
||||
onSelectAll: () -> Unit,
|
||||
onInvertSelection: () -> Unit,
|
||||
onCancelActionMode: () -> Unit,
|
||||
) {
|
||||
AppBar(
|
||||
modifier = modifier,
|
||||
@@ -193,7 +198,7 @@ fun UpdatesAppBar(
|
||||
}
|
||||
},
|
||||
actionModeCounter = actionModeCounter,
|
||||
onCancelActionMode = { selected.clear() },
|
||||
onCancelActionMode = onCancelActionMode,
|
||||
actionModeActions = {
|
||||
IconButton(onClick = onSelectAll) {
|
||||
Icon(
|
||||
@@ -215,7 +220,7 @@ fun UpdatesAppBar(
|
||||
|
||||
@Composable
|
||||
fun UpdatesBottomBar(
|
||||
selected: MutableList<UpdatesUiModel.Item>,
|
||||
selected: List<UpdatesUiModel.Item>,
|
||||
onDownloadChapter: (List<UpdatesItem>, ChapterDownloadAction) -> Unit,
|
||||
onMultiBookmarkClicked: (List<UpdatesItem>, bookmark: Boolean) -> Unit,
|
||||
onMultiMarkAsReadClicked: (List<UpdatesItem>, read: Boolean) -> Unit,
|
||||
@@ -226,29 +231,23 @@ fun UpdatesBottomBar(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
onBookmarkClicked = {
|
||||
onMultiBookmarkClicked.invoke(selected.map { it.item }, true)
|
||||
selected.clear()
|
||||
}.takeIf { selected.any { !it.item.update.bookmark } },
|
||||
onRemoveBookmarkClicked = {
|
||||
onMultiBookmarkClicked.invoke(selected.map { it.item }, false)
|
||||
selected.clear()
|
||||
}.takeIf { selected.all { it.item.update.bookmark } },
|
||||
onMarkAsReadClicked = {
|
||||
onMultiMarkAsReadClicked(selected.map { it.item }, true)
|
||||
selected.clear()
|
||||
}.takeIf { selected.any { !it.item.update.read } },
|
||||
onMarkAsUnreadClicked = {
|
||||
onMultiMarkAsReadClicked(selected.map { it.item }, false)
|
||||
selected.clear()
|
||||
}.takeIf { selected.any { it.item.update.read } },
|
||||
onDownloadClicked = {
|
||||
onDownloadChapter(selected.map { it.item }, ChapterDownloadAction.START)
|
||||
selected.clear()
|
||||
}.takeIf {
|
||||
selected.any { it.item.downloadStateProvider() != Download.State.DOWNLOADED }
|
||||
},
|
||||
onDeleteClicked = {
|
||||
onMultiDeleteClicked(selected.map { it.item })
|
||||
selected.clear()
|
||||
}.takeIf { selected.any { it.item.downloadStateProvider() == Download.State.DOWNLOADED } },
|
||||
)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package eu.kanade.presentation.updates
|
||||
|
||||
import androidx.compose.runtime.Stable
|
||||
import androidx.compose.runtime.derivedStateOf
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import eu.kanade.tachiyomi.ui.recent.updates.UpdatesPresenter
|
||||
|
||||
@Stable
|
||||
interface UpdatesState {
|
||||
val isLoading: Boolean
|
||||
val uiModels: List<UpdatesUiModel>
|
||||
val selected: List<UpdatesUiModel.Item>
|
||||
val selectionMode: Boolean
|
||||
var dialog: UpdatesPresenter.Dialog?
|
||||
}
|
||||
fun UpdatesState(): UpdatesState = UpdatesStateImpl()
|
||||
class UpdatesStateImpl : UpdatesState {
|
||||
override var isLoading: Boolean by mutableStateOf(true)
|
||||
override var uiModels: List<UpdatesUiModel> by mutableStateOf(emptyList())
|
||||
override val selected: List<UpdatesUiModel.Item> by derivedStateOf {
|
||||
uiModels.filterIsInstance<UpdatesUiModel.Item>()
|
||||
.filter { it.item.selected }
|
||||
}
|
||||
override val selectionMode: Boolean by derivedStateOf { selected.isNotEmpty() }
|
||||
override var dialog: UpdatesPresenter.Dialog? by mutableStateOf(null)
|
||||
}
|
||||
@@ -26,7 +26,9 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.alpha
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.hapticfeedback.HapticFeedbackType
|
||||
import androidx.compose.ui.platform.LocalDensity
|
||||
import androidx.compose.ui.platform.LocalHapticFeedback
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
@@ -44,9 +46,8 @@ import java.text.DateFormat
|
||||
|
||||
fun LazyListScope.updatesUiItems(
|
||||
uiModels: List<UpdatesUiModel>,
|
||||
itemUiModels: List<UpdatesUiModel.Item>,
|
||||
selected: MutableList<UpdatesUiModel.Item>,
|
||||
selectedPositions: Array<Int>,
|
||||
selectionMode: Boolean,
|
||||
onUpdateSelected: (UpdatesItem, Boolean, Boolean, Boolean) -> Unit,
|
||||
onClickCover: (UpdatesItem) -> Unit,
|
||||
onClickUpdate: (UpdatesItem) -> Unit,
|
||||
onDownloadChapter: (List<UpdatesItem>, ChapterDownloadAction) -> Unit,
|
||||
@@ -78,35 +79,27 @@ fun LazyListScope.updatesUiItems(
|
||||
)
|
||||
}
|
||||
is UpdatesUiModel.Item -> {
|
||||
val value = item.item
|
||||
val update = value.update
|
||||
val updatesItem = item.item
|
||||
val update = updatesItem.update
|
||||
UpdatesUiItem(
|
||||
modifier = Modifier.animateItemPlacement(),
|
||||
update = update,
|
||||
selected = selected.contains(item),
|
||||
onClick = {
|
||||
onUpdatesItemClick(
|
||||
updatesItem = item,
|
||||
selected = selected,
|
||||
updates = itemUiModels,
|
||||
selectedPositions = selectedPositions,
|
||||
onUpdateClicked = onClickUpdate,
|
||||
)
|
||||
},
|
||||
selected = updatesItem.selected,
|
||||
onLongClick = {
|
||||
onUpdatesItemLongClick(
|
||||
updatesItem = item,
|
||||
selected = selected,
|
||||
updates = itemUiModels,
|
||||
selectedPositions = selectedPositions,
|
||||
)
|
||||
onUpdateSelected(updatesItem, !updatesItem.selected, true, true)
|
||||
},
|
||||
onClickCover = { if (selected.size == 0) onClickCover(value) },
|
||||
onClick = {
|
||||
when {
|
||||
selectionMode -> onUpdateSelected(updatesItem, !updatesItem.selected, true, false)
|
||||
else -> onClickUpdate(updatesItem)
|
||||
}
|
||||
},
|
||||
onClickCover = { if (selectionMode.not()) onClickCover(updatesItem) },
|
||||
onDownloadChapter = {
|
||||
if (selected.size == 0) onDownloadChapter(listOf(value), it)
|
||||
if (selectionMode.not()) onDownloadChapter(listOf(updatesItem), it)
|
||||
},
|
||||
downloadStateProvider = value.downloadStateProvider,
|
||||
downloadProgressProvider = value.downloadProgressProvider,
|
||||
downloadStateProvider = updatesItem.downloadStateProvider,
|
||||
downloadProgressProvider = updatesItem.downloadProgressProvider,
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -126,12 +119,16 @@ fun UpdatesUiItem(
|
||||
downloadStateProvider: () -> Download.State,
|
||||
downloadProgressProvider: () -> Int,
|
||||
) {
|
||||
val haptic = LocalHapticFeedback.current
|
||||
Row(
|
||||
modifier = modifier
|
||||
.background(if (selected) MaterialTheme.colorScheme.surfaceVariant else Color.Transparent)
|
||||
.combinedClickable(
|
||||
onClick = onClick,
|
||||
onLongClick = onLongClick,
|
||||
onLongClick = {
|
||||
onLongClick()
|
||||
haptic.performHapticFeedback(HapticFeedbackType.LongPress)
|
||||
},
|
||||
)
|
||||
.height(56.dp)
|
||||
.padding(horizontal = horizontalPadding),
|
||||
@@ -198,73 +195,3 @@ fun UpdatesUiItem(
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun onUpdatesItemLongClick(
|
||||
updatesItem: UpdatesUiModel.Item,
|
||||
selected: MutableList<UpdatesUiModel.Item>,
|
||||
updates: List<UpdatesUiModel.Item>,
|
||||
selectedPositions: Array<Int>,
|
||||
): Boolean {
|
||||
if (!selected.contains(updatesItem)) {
|
||||
val selectedIndex = updates.indexOf(updatesItem)
|
||||
if (selected.isEmpty()) {
|
||||
selected.add(updatesItem)
|
||||
selectedPositions[0] = selectedIndex
|
||||
selectedPositions[1] = selectedIndex
|
||||
return true
|
||||
}
|
||||
|
||||
// Try to select the items in-between when possible
|
||||
val range: IntRange
|
||||
if (selectedIndex < selectedPositions[0]) {
|
||||
range = selectedIndex until selectedPositions[0]
|
||||
selectedPositions[0] = selectedIndex
|
||||
} else if (selectedIndex > selectedPositions[1]) {
|
||||
range = (selectedPositions[1] + 1)..selectedIndex
|
||||
selectedPositions[1] = selectedIndex
|
||||
} else {
|
||||
// Just select itself
|
||||
range = selectedIndex..selectedIndex
|
||||
}
|
||||
|
||||
range.forEach {
|
||||
val toAdd = updates[it]
|
||||
if (!selected.contains(toAdd)) {
|
||||
selected.add(toAdd)
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
private fun onUpdatesItemClick(
|
||||
updatesItem: UpdatesUiModel.Item,
|
||||
selected: MutableList<UpdatesUiModel.Item>,
|
||||
updates: List<UpdatesUiModel.Item>,
|
||||
selectedPositions: Array<Int>,
|
||||
onUpdateClicked: (UpdatesItem) -> Unit,
|
||||
) {
|
||||
val selectedIndex = updates.indexOf(updatesItem)
|
||||
when {
|
||||
selected.contains(updatesItem) -> {
|
||||
val removedIndex = updates.indexOf(updatesItem)
|
||||
selected.remove(updatesItem)
|
||||
|
||||
if (removedIndex == selectedPositions[0]) {
|
||||
selectedPositions[0] = updates.indexOfFirst { selected.contains(it) }
|
||||
} else if (removedIndex == selectedPositions[1]) {
|
||||
selectedPositions[1] = updates.indexOfLast { selected.contains(it) }
|
||||
}
|
||||
}
|
||||
selected.isNotEmpty() -> {
|
||||
if (selectedIndex < selectedPositions[0]) {
|
||||
selectedPositions[0] = selectedIndex
|
||||
} else if (selectedIndex > selectedPositions[1]) {
|
||||
selectedPositions[1] = selectedIndex
|
||||
}
|
||||
selected.add(updatesItem)
|
||||
}
|
||||
else -> onUpdateClicked(updatesItem.item)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user