mirror of
https://github.com/PhilKes/NotallyX.git
synced 2025-06-28 20:29:54 +00:00
Remove obsolete defaultNoteViewMode preference
This commit is contained in:
parent
c586eab072
commit
b5e13ce73a
15 changed files with 29 additions and 61 deletions
|
@ -2,11 +2,11 @@
|
||||||
"formatVersion": 1,
|
"formatVersion": 1,
|
||||||
"database": {
|
"database": {
|
||||||
"version": 9,
|
"version": 9,
|
||||||
"identityHash": "794af16cac662f9dc12be0736752f1a5",
|
"identityHash": "042b20b5b4cfc8415e6cf6348196e869",
|
||||||
"entities": [
|
"entities": [
|
||||||
{
|
{
|
||||||
"tableName": "BaseNote",
|
"tableName": "BaseNote",
|
||||||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `type` TEXT NOT NULL, `folder` TEXT NOT NULL, `color` TEXT NOT NULL, `title` TEXT NOT NULL, `pinned` INTEGER NOT NULL, `timestamp` INTEGER NOT NULL, `modifiedTimestamp` INTEGER NOT NULL, `labels` TEXT NOT NULL, `body` TEXT NOT NULL, `spans` TEXT NOT NULL, `items` TEXT NOT NULL, `images` TEXT NOT NULL, `files` TEXT NOT NULL, `audios` TEXT NOT NULL, `reminders` TEXT NOT NULL, `viewMode` TEXT)",
|
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `type` TEXT NOT NULL, `folder` TEXT NOT NULL, `color` TEXT NOT NULL, `title` TEXT NOT NULL, `pinned` INTEGER NOT NULL, `timestamp` INTEGER NOT NULL, `modifiedTimestamp` INTEGER NOT NULL, `labels` TEXT NOT NULL, `body` TEXT NOT NULL, `spans` TEXT NOT NULL, `items` TEXT NOT NULL, `images` TEXT NOT NULL, `files` TEXT NOT NULL, `audios` TEXT NOT NULL, `reminders` TEXT NOT NULL, `viewMode` TEXT NOT NULL)",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"fieldPath": "id",
|
"fieldPath": "id",
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
"fieldPath": "viewMode",
|
"fieldPath": "viewMode",
|
||||||
"columnName": "viewMode",
|
"columnName": "viewMode",
|
||||||
"affinity": "TEXT",
|
"affinity": "TEXT",
|
||||||
"notNull": false
|
"notNull": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"primaryKey": {
|
"primaryKey": {
|
||||||
|
@ -158,7 +158,7 @@
|
||||||
"views": [],
|
"views": [],
|
||||||
"setupQueries": [
|
"setupQueries": [
|
||||||
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
|
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
|
||||||
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '794af16cac662f9dc12be0736752f1a5')"
|
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '042b20b5b4cfc8415e6cf6348196e869')"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -19,6 +19,7 @@ import com.philkes.notallyx.data.model.BaseNote
|
||||||
import com.philkes.notallyx.data.model.Color
|
import com.philkes.notallyx.data.model.Color
|
||||||
import com.philkes.notallyx.data.model.Converters
|
import com.philkes.notallyx.data.model.Converters
|
||||||
import com.philkes.notallyx.data.model.Label
|
import com.philkes.notallyx.data.model.Label
|
||||||
|
import com.philkes.notallyx.data.model.NoteViewMode
|
||||||
import com.philkes.notallyx.data.model.toColorString
|
import com.philkes.notallyx.data.model.toColorString
|
||||||
import com.philkes.notallyx.presentation.view.misc.NotNullLiveData
|
import com.philkes.notallyx.presentation.view.misc.NotNullLiveData
|
||||||
import com.philkes.notallyx.presentation.viewmodel.preference.BiometricLock
|
import com.philkes.notallyx.presentation.viewmodel.preference.BiometricLock
|
||||||
|
@ -266,7 +267,9 @@ abstract class NotallyDatabase : RoomDatabase() {
|
||||||
object Migration9 : Migration(8, 9) {
|
object Migration9 : Migration(8, 9) {
|
||||||
|
|
||||||
override fun migrate(db: SupportSQLiteDatabase) {
|
override fun migrate(db: SupportSQLiteDatabase) {
|
||||||
db.execSQL("ALTER TABLE `BaseNote` ADD COLUMN `viewMode` TEXT DEFAULT NULL")
|
db.execSQL(
|
||||||
|
"ALTER TABLE `BaseNote` ADD COLUMN `viewMode` TEXT DEFAULT '${NoteViewMode.EDIT.name}'"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ import com.philkes.notallyx.data.model.BaseNote
|
||||||
import com.philkes.notallyx.data.model.FileAttachment
|
import com.philkes.notallyx.data.model.FileAttachment
|
||||||
import com.philkes.notallyx.data.model.Folder
|
import com.philkes.notallyx.data.model.Folder
|
||||||
import com.philkes.notallyx.data.model.ListItem
|
import com.philkes.notallyx.data.model.ListItem
|
||||||
|
import com.philkes.notallyx.data.model.NoteViewMode
|
||||||
import com.philkes.notallyx.data.model.Type
|
import com.philkes.notallyx.data.model.Type
|
||||||
import com.philkes.notallyx.utils.log
|
import com.philkes.notallyx.utils.log
|
||||||
import com.philkes.notallyx.utils.startsWithAnyOf
|
import com.philkes.notallyx.utils.startsWithAnyOf
|
||||||
|
@ -155,7 +156,7 @@ fun EvernoteNote.mapToBaseNote(): BaseNote {
|
||||||
files = files,
|
files = files,
|
||||||
audios = audios,
|
audios = audios,
|
||||||
reminders = mutableListOf(),
|
reminders = mutableListOf(),
|
||||||
null,
|
NoteViewMode.EDIT,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ import com.philkes.notallyx.data.model.BaseNote
|
||||||
import com.philkes.notallyx.data.model.FileAttachment
|
import com.philkes.notallyx.data.model.FileAttachment
|
||||||
import com.philkes.notallyx.data.model.Folder
|
import com.philkes.notallyx.data.model.Folder
|
||||||
import com.philkes.notallyx.data.model.ListItem
|
import com.philkes.notallyx.data.model.ListItem
|
||||||
|
import com.philkes.notallyx.data.model.NoteViewMode
|
||||||
import com.philkes.notallyx.data.model.Type
|
import com.philkes.notallyx.data.model.Type
|
||||||
import com.philkes.notallyx.utils.listFilesRecursive
|
import com.philkes.notallyx.utils.listFilesRecursive
|
||||||
import com.philkes.notallyx.utils.log
|
import com.philkes.notallyx.utils.log
|
||||||
|
@ -162,7 +163,7 @@ class GoogleKeepImporter : ExternalImporter {
|
||||||
files = files,
|
files = files,
|
||||||
audios = audios,
|
audios = audios,
|
||||||
reminders = mutableListOf(),
|
reminders = mutableListOf(),
|
||||||
null,
|
NoteViewMode.EDIT,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ import com.philkes.notallyx.data.imports.ImportProgress
|
||||||
import com.philkes.notallyx.data.model.BaseNote
|
import com.philkes.notallyx.data.model.BaseNote
|
||||||
import com.philkes.notallyx.data.model.Folder
|
import com.philkes.notallyx.data.model.Folder
|
||||||
import com.philkes.notallyx.data.model.ListItem
|
import com.philkes.notallyx.data.model.ListItem
|
||||||
|
import com.philkes.notallyx.data.model.NoteViewMode
|
||||||
import com.philkes.notallyx.data.model.Type
|
import com.philkes.notallyx.data.model.Type
|
||||||
import com.philkes.notallyx.utils.MIME_TYPE_JSON
|
import com.philkes.notallyx.utils.MIME_TYPE_JSON
|
||||||
import com.philkes.notallyx.utils.readFileContents
|
import com.philkes.notallyx.utils.readFileContents
|
||||||
|
@ -59,7 +60,7 @@ class PlainTextImporter : ExternalImporter {
|
||||||
files = listOf(),
|
files = listOf(),
|
||||||
audios = listOf(),
|
audios = listOf(),
|
||||||
reminders = listOf(),
|
reminders = listOf(),
|
||||||
null,
|
NoteViewMode.EDIT,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ data class BaseNote(
|
||||||
val files: List<FileAttachment>,
|
val files: List<FileAttachment>,
|
||||||
val audios: List<Audio>,
|
val audios: List<Audio>,
|
||||||
val reminders: List<Reminder>,
|
val reminders: List<Reminder>,
|
||||||
val viewMode: NoteViewMode?,
|
val viewMode: NoteViewMode,
|
||||||
) : Item {
|
) : Item {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -75,7 +75,7 @@ data class BaseNote(
|
||||||
result = 31 * result + files.hashCode()
|
result = 31 * result + files.hashCode()
|
||||||
result = 31 * result + audios.hashCode()
|
result = 31 * result + audios.hashCode()
|
||||||
result = 31 * result + reminders.hashCode()
|
result = 31 * result + reminders.hashCode()
|
||||||
result = 31 * result + (viewMode?.hashCode() ?: 0)
|
result = 31 * result + viewMode.hashCode()
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,26 +100,24 @@ fun BaseNote.toJson(): String {
|
||||||
fun String.toBaseNote(): BaseNote {
|
fun String.toBaseNote(): BaseNote {
|
||||||
val jsonObject = JSONObject(this)
|
val jsonObject = JSONObject(this)
|
||||||
val id = jsonObject.getLongOrDefault("id", -1L)
|
val id = jsonObject.getLongOrDefault("id", -1L)
|
||||||
val type = Type.valueOfOrDefault(jsonObject.getStringOrDefault("type", Type.NOTE.name)!!)
|
val type = Type.valueOfOrDefault(jsonObject.getStringOrDefault("type", Type.NOTE.name))
|
||||||
val folder =
|
val folder = Folder.valueOfOrDefault(jsonObject.getStringOrDefault("folder", Folder.NOTES.name))
|
||||||
Folder.valueOfOrDefault(jsonObject.getStringOrDefault("folder", Folder.NOTES.name)!!)
|
|
||||||
val color =
|
val color =
|
||||||
jsonObject.getStringOrDefault("color", COLOR_DEFAULT)!!.takeIf { it.isValid() }
|
jsonObject.getStringOrDefault("color", COLOR_DEFAULT).takeIf { it.isValid() }
|
||||||
?: COLOR_DEFAULT
|
?: COLOR_DEFAULT
|
||||||
val title = jsonObject.getStringOrDefault("title", "")!!
|
val title = jsonObject.getStringOrDefault("title", "")
|
||||||
val pinned = jsonObject.getBooleanOrDefault("pinned", false)
|
val pinned = jsonObject.getBooleanOrDefault("pinned", false)
|
||||||
val timestamp = jsonObject.getLongOrDefault("timestamp", System.currentTimeMillis())
|
val timestamp = jsonObject.getLongOrDefault("timestamp", System.currentTimeMillis())
|
||||||
val modifiedTimestamp = jsonObject.getLongOrDefault("modifiedTimestamp", timestamp)
|
val modifiedTimestamp = jsonObject.getLongOrDefault("modifiedTimestamp", timestamp)
|
||||||
val labels = Converters.jsonToLabels(jsonObject.getArrayOrEmpty("labels"))
|
val labels = Converters.jsonToLabels(jsonObject.getArrayOrEmpty("labels"))
|
||||||
val body = jsonObject.getStringOrDefault("body", "")!!
|
val body = jsonObject.getStringOrDefault("body", "")
|
||||||
val spans = Converters.jsonToSpans(jsonObject.getArrayOrEmpty("spans"))
|
val spans = Converters.jsonToSpans(jsonObject.getArrayOrEmpty("spans"))
|
||||||
val items = Converters.jsonToItems(jsonObject.getArrayOrEmpty("items"))
|
val items = Converters.jsonToItems(jsonObject.getArrayOrEmpty("items"))
|
||||||
val images = Converters.jsonToFiles(jsonObject.getArrayOrEmpty("images"))
|
val images = Converters.jsonToFiles(jsonObject.getArrayOrEmpty("images"))
|
||||||
val files = Converters.jsonToFiles(jsonObject.getArrayOrEmpty("files"))
|
val files = Converters.jsonToFiles(jsonObject.getArrayOrEmpty("files"))
|
||||||
val audios = Converters.jsonToAudios(jsonObject.getArrayOrEmpty("audios"))
|
val audios = Converters.jsonToAudios(jsonObject.getArrayOrEmpty("audios"))
|
||||||
val reminders = Converters.jsonToReminders(jsonObject.getArrayOrEmpty("reminders"))
|
val reminders = Converters.jsonToReminders(jsonObject.getArrayOrEmpty("reminders"))
|
||||||
val viewMode =
|
val viewMode = NoteViewMode.valueOfOrDefault(jsonObject.getStringOrDefault("viewMode", ""))
|
||||||
jsonObject.getStringOrDefault("viewMode", null)?.let { NoteViewMode.valueOfOrDefault(it) }
|
|
||||||
return BaseNote(
|
return BaseNote(
|
||||||
id,
|
id,
|
||||||
type,
|
type,
|
||||||
|
@ -141,7 +139,7 @@ fun String.toBaseNote(): BaseNote {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun JSONObject.getStringOrDefault(key: String, defaultValue: String?): String? {
|
private fun JSONObject.getStringOrDefault(key: String, defaultValue: String): String {
|
||||||
return try {
|
return try {
|
||||||
getString(key)
|
getString(key)
|
||||||
} catch (exception: JSONException) {
|
} catch (exception: JSONException) {
|
||||||
|
|
|
@ -12,7 +12,7 @@ enum class NoteViewMode(override val textResId: Int) : StaticTextProvider {
|
||||||
try {
|
try {
|
||||||
NoteViewMode.valueOf(value)
|
NoteViewMode.valueOf(value)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
null
|
EDIT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -647,13 +647,6 @@ class SettingsFragment : Fragment() {
|
||||||
model.savePreference(autoSaveAfterIdleTime, newValue)
|
model.savePreference(autoSaveAfterIdleTime, newValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultNoteViewMode.observe(viewLifecycleOwner) { value ->
|
|
||||||
DefaultNoteViewMode.setup(defaultNoteViewMode, value, requireContext()) { newValue
|
|
||||||
->
|
|
||||||
model.savePreference(defaultNoteViewMode, newValue)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ClearData.setOnClickListener {
|
ClearData.setOnClickListener {
|
||||||
MaterialAlertDialogBuilder(requireContext())
|
MaterialAlertDialogBuilder(requireContext())
|
||||||
.setMessage(R.string.clear_data_message)
|
.setMessage(R.string.clear_data_message)
|
||||||
|
|
|
@ -551,13 +551,6 @@ abstract class EditActivity(private val type: Type) :
|
||||||
removeAllViews()
|
removeAllViews()
|
||||||
|
|
||||||
addToggleViewMode()
|
addToggleViewMode()
|
||||||
notallyModel.viewMode.value =
|
|
||||||
when {
|
|
||||||
notallyModel.isNewNote -> NoteViewMode.EDIT
|
|
||||||
notallyModel.viewMode.value != null -> notallyModel.viewMode.value!!
|
|
||||||
else -> preferences.defaultNoteViewMode.value
|
|
||||||
}
|
|
||||||
|
|
||||||
addIconButton(R.string.more, R.drawable.more_vert, marginStart = 0) {
|
addIconButton(R.string.more, R.drawable.more_vert, marginStart = 0) {
|
||||||
MoreNoteBottomSheet(
|
MoreNoteBottomSheet(
|
||||||
this@EditActivity,
|
this@EditActivity,
|
||||||
|
@ -577,9 +570,7 @@ abstract class EditActivity(private val type: Type) :
|
||||||
when (notallyModel.viewMode.value) {
|
when (notallyModel.viewMode.value) {
|
||||||
NoteViewMode.EDIT -> NoteViewMode.READ_ONLY
|
NoteViewMode.EDIT -> NoteViewMode.READ_ONLY
|
||||||
NoteViewMode.READ_ONLY -> NoteViewMode.EDIT
|
NoteViewMode.READ_ONLY -> NoteViewMode.EDIT
|
||||||
null -> NoteViewMode.EDIT
|
|
||||||
}
|
}
|
||||||
notallyModel.viewModeChangedByUser = true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,8 +93,7 @@ class NotallyModel(private val app: Application) : AndroidViewModel(app) {
|
||||||
val audios = NotNullLiveData<List<Audio>>(emptyList())
|
val audios = NotNullLiveData<List<Audio>>(emptyList())
|
||||||
|
|
||||||
val reminders = NotNullLiveData<List<Reminder>>(emptyList())
|
val reminders = NotNullLiveData<List<Reminder>>(emptyList())
|
||||||
val viewMode = MutableLiveData<NoteViewMode?>(null)
|
val viewMode = NotNullLiveData(NoteViewMode.EDIT)
|
||||||
var viewModeChangedByUser = false
|
|
||||||
|
|
||||||
val addingFiles = MutableLiveData<Progress>()
|
val addingFiles = MutableLiveData<Progress>()
|
||||||
val eventBus = MutableLiveData<Event<List<FileError>>>()
|
val eventBus = MutableLiveData<Event<List<FileError>>>()
|
||||||
|
@ -254,7 +253,6 @@ class NotallyModel(private val app: Application) : AndroidViewModel(app) {
|
||||||
audios.value = baseNote.audios
|
audios.value = baseNote.audios
|
||||||
reminders.value = baseNote.reminders
|
reminders.value = baseNote.reminders
|
||||||
viewMode.value = baseNote.viewMode
|
viewMode.value = baseNote.viewMode
|
||||||
viewModeChangedByUser = false
|
|
||||||
} else {
|
} else {
|
||||||
originalNote = createBaseNote()
|
originalNote = createBaseNote()
|
||||||
app.showToast(R.string.cant_find_note)
|
app.showToast(R.string.cant_find_note)
|
||||||
|
@ -335,12 +333,6 @@ class NotallyModel(private val app: Application) : AndroidViewModel(app) {
|
||||||
val spans = getFilteredSpans(body)
|
val spans = getFilteredSpans(body)
|
||||||
val body = this.body.toString()
|
val body = this.body.toString()
|
||||||
val nonEmptyItems = this.items.filter { item -> item.body.isNotEmpty() }
|
val nonEmptyItems = this.items.filter { item -> item.body.isNotEmpty() }
|
||||||
val viewMode =
|
|
||||||
if (isNewNote) {
|
|
||||||
null
|
|
||||||
} else if (viewModeChangedByUser) {
|
|
||||||
viewMode.value
|
|
||||||
} else originalNote?.viewMode
|
|
||||||
return BaseNote(
|
return BaseNote(
|
||||||
id,
|
id,
|
||||||
type,
|
type,
|
||||||
|
@ -358,7 +350,7 @@ class NotallyModel(private val app: Application) : AndroidViewModel(app) {
|
||||||
files.value,
|
files.value,
|
||||||
audios.value,
|
audios.value,
|
||||||
reminders.value,
|
reminders.value,
|
||||||
viewMode,
|
viewMode.value,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ import androidx.preference.PreferenceManager
|
||||||
import androidx.security.crypto.EncryptedSharedPreferences
|
import androidx.security.crypto.EncryptedSharedPreferences
|
||||||
import androidx.security.crypto.MasterKey
|
import androidx.security.crypto.MasterKey
|
||||||
import com.philkes.notallyx.R
|
import com.philkes.notallyx.R
|
||||||
import com.philkes.notallyx.data.model.NoteViewMode
|
|
||||||
import com.philkes.notallyx.data.model.Type
|
import com.philkes.notallyx.data.model.Type
|
||||||
import com.philkes.notallyx.presentation.viewmodel.preference.Constants.PASSWORD_EMPTY
|
import com.philkes.notallyx.presentation.viewmodel.preference.Constants.PASSWORD_EMPTY
|
||||||
import com.philkes.notallyx.utils.backup.importPreferences
|
import com.philkes.notallyx.utils.backup.importPreferences
|
||||||
|
@ -77,13 +76,6 @@ class NotallyXPreferences private constructor(private val context: Context) {
|
||||||
10,
|
10,
|
||||||
R.string.max_lines_to_display_title,
|
R.string.max_lines_to_display_title,
|
||||||
)
|
)
|
||||||
val defaultNoteViewMode =
|
|
||||||
createEnumPreference(
|
|
||||||
preferences,
|
|
||||||
"defaultNoteViewMode",
|
|
||||||
NoteViewMode.EDIT,
|
|
||||||
R.string.default_note_view_mode,
|
|
||||||
)
|
|
||||||
val labelsHidden = StringSetPreference("labelsHiddenInNavigation", preferences, setOf())
|
val labelsHidden = StringSetPreference("labelsHiddenInNavigation", preferences, setOf())
|
||||||
val labelTagsHiddenInOverview =
|
val labelTagsHiddenInOverview =
|
||||||
BooleanPreference(
|
BooleanPreference(
|
||||||
|
@ -238,7 +230,6 @@ class NotallyXPreferences private constructor(private val context: Context) {
|
||||||
backupPassword,
|
backupPassword,
|
||||||
backupOnSave,
|
backupOnSave,
|
||||||
autoSaveAfterIdleTime,
|
autoSaveAfterIdleTime,
|
||||||
defaultNoteViewMode,
|
|
||||||
)
|
)
|
||||||
.forEach { it.refresh() }
|
.forEach { it.refresh() }
|
||||||
}
|
}
|
||||||
|
|
|
@ -285,7 +285,7 @@ private fun Cursor.toBaseNote(): BaseNote {
|
||||||
val viewMode =
|
val viewMode =
|
||||||
if (viewModeIndex != -1) {
|
if (viewModeIndex != -1) {
|
||||||
NoteViewMode.valueOfOrDefault(getString(viewModeIndex))
|
NoteViewMode.valueOfOrDefault(getString(viewModeIndex))
|
||||||
} else null
|
} else NoteViewMode.EDIT
|
||||||
return BaseNote(
|
return BaseNote(
|
||||||
0,
|
0,
|
||||||
type,
|
type,
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.philkes.notallyx.data.model.BaseNote
|
||||||
import com.philkes.notallyx.data.model.Folder
|
import com.philkes.notallyx.data.model.Folder
|
||||||
import com.philkes.notallyx.data.model.Label
|
import com.philkes.notallyx.data.model.Label
|
||||||
import com.philkes.notallyx.data.model.ListItem
|
import com.philkes.notallyx.data.model.ListItem
|
||||||
|
import com.philkes.notallyx.data.model.NoteViewMode
|
||||||
import com.philkes.notallyx.data.model.SpanRepresentation
|
import com.philkes.notallyx.data.model.SpanRepresentation
|
||||||
import com.philkes.notallyx.data.model.Type
|
import com.philkes.notallyx.data.model.Type
|
||||||
import com.philkes.notallyx.data.model.parseToColorString
|
import com.philkes.notallyx.data.model.parseToColorString
|
||||||
|
@ -113,7 +114,7 @@ private fun XmlPullParser.parseBaseNote(rootTag: String, folder: Folder): BaseNo
|
||||||
emptyList(),
|
emptyList(),
|
||||||
emptyList(),
|
emptyList(),
|
||||||
emptyList(),
|
emptyList(),
|
||||||
null,
|
NoteViewMode.EDIT,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,10 +53,6 @@
|
||||||
android:id="@+id/StartView"
|
android:id="@+id/StartView"
|
||||||
layout="@layout/preference" />
|
layout="@layout/preference" />
|
||||||
|
|
||||||
<include
|
|
||||||
android:id="@+id/DefaultNoteViewMode"
|
|
||||||
layout="@layout/preference" />
|
|
||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/AutoSaveAfterIdle"
|
android:id="@+id/AutoSaveAfterIdle"
|
||||||
layout="@layout/preference_seekbar" />
|
layout="@layout/preference_seekbar" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue