tweaking a string to make it clearer

This commit is contained in:
tibbi
2021-02-07 23:06:14 +01:00
parent 195bb2573d
commit c3e7895a11
37 changed files with 40 additions and 40 deletions

View File

@ -132,10 +132,10 @@ class SettingsActivity : SimpleActivity() {
}
private fun setupMoveUndoneChecklistItems() {
settings_move_undone_checklist_items.isChecked = config.moveUndoneChecklistItems
settings_move_undone_checklist_items.isChecked = config.moveDoneChecklistItems
settings_move_undone_checklist_items_holder.setOnClickListener {
settings_move_undone_checklist_items.toggle()
config.moveUndoneChecklistItems = settings_move_undone_checklist_items.isChecked
config.moveDoneChecklistItems = settings_move_undone_checklist_items.isChecked
}
}

View File

@ -94,7 +94,7 @@ class WidgetAdapter(val context: Context, val intent: Intent) : RemoteViewsServi
if (note?.type == NoteType.TYPE_CHECKLIST.value) {
val checklistItemType = object : TypeToken<List<ChecklistItem>>() {}.type
checklistItems = Gson().fromJson<ArrayList<ChecklistItem>>(note!!.value, checklistItemType) ?: ArrayList(1)
if (context.config.moveUndoneChecklistItems) {
if (context.config.moveDoneChecklistItems) {
checklistItems.sortBy { it.isDone }
}
}

View File

@ -66,7 +66,7 @@ class ChecklistFragment : NoteFragment(), ChecklistItemsListener {
migrateCheckListOnFailure(storedNote)
}
if (config?.moveUndoneChecklistItems == true) {
if (config?.moveDoneChecklistItems == true) {
items.sortBy { it.isDone }
}

View File

@ -75,9 +75,9 @@ class Config(context: Context) : BaseConfig(context) {
get() = prefs.getInt(LAST_CREATED_NOTE_TYPE, NoteType.TYPE_TEXT.value)
set(lastCreatedNoteType) = prefs.edit().putInt(LAST_CREATED_NOTE_TYPE, lastCreatedNoteType).apply()
var moveUndoneChecklistItems: Boolean
get() = prefs.getBoolean(MOVE_UNDONE_CHECKLIST_ITEMS, false)
set(moveUndoneChecklistItems) = prefs.edit().putBoolean(MOVE_UNDONE_CHECKLIST_ITEMS, moveUndoneChecklistItems).apply()
var moveDoneChecklistItems: Boolean
get() = prefs.getBoolean(MOVE_DONE_CHECKLIST_ITEMS, false)
set(moveDoneChecklistItems) = prefs.edit().putBoolean(MOVE_DONE_CHECKLIST_ITEMS, moveDoneChecklistItems).apply()
@SuppressLint("RtlHardcoded")
fun getTextGravity() = when (gravity) {

View File

@ -29,7 +29,7 @@ const val LAST_USED_SAVE_PATH = "last_used_save_path"
const val ENABLE_LINE_WRAP = "enable_line_wrap"
const val USE_INCOGNITO_MODE = "use_incognito_mode"
const val LAST_CREATED_NOTE_TYPE = "last_created_note_type"
const val MOVE_UNDONE_CHECKLIST_ITEMS = "move_undone_checklist_items"
const val MOVE_DONE_CHECKLIST_ITEMS = "move_undone_checklist_items" // it has been replaced from moving undone items at the top to moving done to bottom
const val FONT_SIZE_PERCENTAGE = "font_size_percentage"
// gravity