mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-21 20:45:29 +03:00
ktlint: Property name should use the screaming snake case notation when the value can not be changed
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
5356edf4a9
commit
12a1b7e6f8
2 changed files with 24 additions and 24 deletions
|
@ -89,12 +89,12 @@ import coil.target.Target;
|
|||
import coil.transform.CircleCropTransformation;
|
||||
import third.parties.fresco.BetterImageSpan;
|
||||
|
||||
import static com.nextcloud.talk.utils.FileSortOrder.sort_a_to_z_id;
|
||||
import static com.nextcloud.talk.utils.FileSortOrder.sort_big_to_small_id;
|
||||
import static com.nextcloud.talk.utils.FileSortOrder.sort_new_to_old_id;
|
||||
import static com.nextcloud.talk.utils.FileSortOrder.sort_old_to_new_id;
|
||||
import static com.nextcloud.talk.utils.FileSortOrder.sort_small_to_big_id;
|
||||
import static com.nextcloud.talk.utils.FileSortOrder.sort_z_to_a_id;
|
||||
import static com.nextcloud.talk.utils.FileSortOrder.SORT_A_TO_Z_ID;
|
||||
import static com.nextcloud.talk.utils.FileSortOrder.SORT_BIG_TO_SMALL_ID;
|
||||
import static com.nextcloud.talk.utils.FileSortOrder.SORT_NEW_TO_OLD_ID;
|
||||
import static com.nextcloud.talk.utils.FileSortOrder.SORT_OLD_TO_NEW_ID;
|
||||
import static com.nextcloud.talk.utils.FileSortOrder.SORT_SMALL_TO_BIG_ID;
|
||||
import static com.nextcloud.talk.utils.FileSortOrder.SORT_Z_TO_A_ID;
|
||||
|
||||
public class DisplayUtils {
|
||||
private static final String TAG = DisplayUtils.class.getSimpleName();
|
||||
|
@ -476,17 +476,17 @@ public class DisplayUtils {
|
|||
public static @StringRes
|
||||
int getSortOrderStringId(FileSortOrder sortOrder) {
|
||||
switch (sortOrder.getName()) {
|
||||
case sort_z_to_a_id:
|
||||
case SORT_Z_TO_A_ID:
|
||||
return R.string.menu_item_sort_by_name_z_a;
|
||||
case sort_new_to_old_id:
|
||||
case SORT_NEW_TO_OLD_ID:
|
||||
return R.string.menu_item_sort_by_date_newest_first;
|
||||
case sort_old_to_new_id:
|
||||
case SORT_OLD_TO_NEW_ID:
|
||||
return R.string.menu_item_sort_by_date_oldest_first;
|
||||
case sort_big_to_small_id:
|
||||
case SORT_BIG_TO_SMALL_ID:
|
||||
return R.string.menu_item_sort_by_size_biggest_first;
|
||||
case sort_small_to_big_id:
|
||||
case SORT_SMALL_TO_BIG_ID:
|
||||
return R.string.menu_item_sort_by_size_smallest_first;
|
||||
case sort_a_to_z_id:
|
||||
case SORT_A_TO_Z_ID:
|
||||
default:
|
||||
return R.string.menu_item_sort_by_name_a_z;
|
||||
}
|
||||
|
|
|
@ -27,19 +27,19 @@ import java.util.Collections
|
|||
|
||||
open class FileSortOrder(var name: String, var isAscending: Boolean) {
|
||||
companion object {
|
||||
const val sort_a_to_z_id = "sort_a_to_z"
|
||||
const val sort_z_to_a_id = "sort_z_to_a"
|
||||
const val sort_old_to_new_id = "sort_old_to_new"
|
||||
const val sort_new_to_old_id = "sort_new_to_old"
|
||||
const val sort_small_to_big_id = "sort_small_to_big"
|
||||
const val sort_big_to_small_id = "sort_big_to_small"
|
||||
const val SORT_A_TO_Z_ID = "sort_a_to_z"
|
||||
const val SORT_Z_TO_A_ID = "sort_z_to_a"
|
||||
const val SORT_OLD_TO_NEW_ID = "sort_old_to_new"
|
||||
const val SORT_NEW_TO_OLD_ID = "sort_new_to_old"
|
||||
const val SORT_SMALL_TO_BIG_ID = "sort_small_to_big"
|
||||
const val SORT_BIG_TO_SMALL_ID = "sort_big_to_small"
|
||||
|
||||
val sort_a_to_z: FileSortOrder = FileSortOrderByName(sort_a_to_z_id, true)
|
||||
val sort_z_to_a: FileSortOrder = FileSortOrderByName(sort_z_to_a_id, false)
|
||||
val sort_old_to_new: FileSortOrder = FileSortOrderByDate(sort_old_to_new_id, true)
|
||||
val sort_new_to_old: FileSortOrder = FileSortOrderByDate(sort_new_to_old_id, false)
|
||||
val sort_small_to_big: FileSortOrder = FileSortOrderBySize(sort_small_to_big_id, true)
|
||||
val sort_big_to_small: FileSortOrder = FileSortOrderBySize(sort_big_to_small_id, false)
|
||||
val sort_a_to_z: FileSortOrder = FileSortOrderByName(SORT_A_TO_Z_ID, true)
|
||||
val sort_z_to_a: FileSortOrder = FileSortOrderByName(SORT_Z_TO_A_ID, false)
|
||||
val sort_old_to_new: FileSortOrder = FileSortOrderByDate(SORT_OLD_TO_NEW_ID, true)
|
||||
val sort_new_to_old: FileSortOrder = FileSortOrderByDate(SORT_NEW_TO_OLD_ID, false)
|
||||
val sort_small_to_big: FileSortOrder = FileSortOrderBySize(SORT_SMALL_TO_BIG_ID, true)
|
||||
val sort_big_to_small: FileSortOrder = FileSortOrderBySize(SORT_BIG_TO_SMALL_ID, false)
|
||||
|
||||
val sortOrders: Map<String, FileSortOrder> = mapOf(
|
||||
sort_a_to_z.name to sort_a_to_z,
|
||||
|
|
Loading…
Reference in a new issue