@@ -63,38 +63,38 @@ class MultiSelectBottomSheetDialog : ActionsBottomSheetDialog() {
63
63
64
64
// This `.toSet()` is used to make an immutable local copy of `selectedThreads`.
65
65
val threads = selectedThreads.toSet()
66
- val selectedThreadsUids = threads.map { it.uid }
67
- val selectedThreadsCount = selectedThreadsUids .count()
66
+ val threadsUids = threads.map { it.uid }
67
+ val threadsCount = threadsUids .count()
68
68
val (shouldRead, shouldFavorite) = ThreadListMultiSelection .computeReadFavoriteStatus(threads)
69
69
70
70
setStateDependentUi(shouldRead, shouldFavorite)
71
71
72
72
binding.mainActions.setClosingOnClickListener(shouldCloseMultiSelection = true ) { id: Int ->
73
73
when (id) {
74
74
R .id.actionMove -> {
75
- trackMultiSelectActionEvent(ACTION_MOVE_NAME , selectedThreadsCount , isFromBottomSheet = true )
75
+ trackMultiSelectActionEvent(ACTION_MOVE_NAME , threadsCount , isFromBottomSheet = true )
76
76
animatedNavigation(
77
77
directions = ThreadListFragmentDirections .actionThreadListFragmentToMoveFragment(
78
- threadsUids = selectedThreadsUids .toTypedArray(),
78
+ threadsUids = threadsUids .toTypedArray(),
79
79
),
80
80
currentClassName = currentClassName,
81
81
)
82
82
}
83
83
R .id.actionReadUnread -> {
84
- trackMultiSelectActionEvent(ACTION_MARK_AS_SEEN_NAME , selectedThreadsCount , isFromBottomSheet = true )
85
- toggleThreadsSeenStatus(selectedThreadsUids , shouldRead)
84
+ trackMultiSelectActionEvent(ACTION_MARK_AS_SEEN_NAME , threadsCount , isFromBottomSheet = true )
85
+ toggleThreadsSeenStatus(threadsUids , shouldRead)
86
86
}
87
87
R .id.actionArchive -> {
88
- trackMultiSelectActionEvent(ACTION_ARCHIVE_NAME , selectedThreadsCount , isFromBottomSheet = true )
89
- archiveThreads(selectedThreadsUids )
88
+ trackMultiSelectActionEvent(ACTION_ARCHIVE_NAME , threadsCount , isFromBottomSheet = true )
89
+ archiveThreads(threadsUids )
90
90
}
91
91
R .id.actionDelete -> {
92
92
descriptionDialog.deleteWithConfirmationPopup(
93
93
folderRole = getActionFolderRole(threads.firstOrNull()),
94
- count = selectedThreadsCount ,
94
+ count = threadsCount ,
95
95
) {
96
- trackMultiSelectActionEvent(ACTION_DELETE_NAME , selectedThreadsCount , isFromBottomSheet = true )
97
- deleteThreads(selectedThreadsUids )
96
+ trackMultiSelectActionEvent(ACTION_DELETE_NAME , threadsCount , isFromBottomSheet = true )
97
+ deleteThreads(threadsUids )
98
98
}
99
99
}
100
100
}
@@ -108,14 +108,14 @@ class MultiSelectBottomSheetDialog : ActionsBottomSheetDialog() {
108
108
// }
109
109
110
110
binding.spam.setClosingOnClickListener(shouldCloseMultiSelection = true ) {
111
- trackMultiSelectActionEvent(ACTION_SPAM_NAME , selectedThreadsCount , isFromBottomSheet = true )
112
- toggleThreadsSpamStatus(selectedThreadsUids )
111
+ trackMultiSelectActionEvent(ACTION_SPAM_NAME , threadsCount , isFromBottomSheet = true )
112
+ toggleThreadsSpamStatus(threadsUids )
113
113
isMultiSelectOn = false
114
114
}
115
115
116
116
binding.favorite.setClosingOnClickListener(shouldCloseMultiSelection = true ) {
117
- trackMultiSelectActionEvent(ACTION_FAVORITE_NAME , selectedThreadsCount , isFromBottomSheet = true )
118
- toggleThreadsFavoriteStatus(selectedThreadsUids , shouldFavorite)
117
+ trackMultiSelectActionEvent(ACTION_FAVORITE_NAME , threadsCount , isFromBottomSheet = true )
118
+ toggleThreadsFavoriteStatus(threadsUids , shouldFavorite)
119
119
isMultiSelectOn = false
120
120
}
121
121
}
0 commit comments