Refactor: Code-Bereinigung und Kotlin-Update
- Entferne ungenutzte Funktionen und Parameter in ViewModels und Composable-Funktionen. - Optimiere String-Manipulationen und Uri-Parsing. - Aktualisiere die Kotlin-Version in libs.versions.toml. - Füge neue Einträge zu .idea/dictionaries/project.xml hinzu und ignoriere neue .idea-Dateien.
This commit is contained in:
26
.idea/appInsightsSettings.xml
generated
Normal file
26
.idea/appInsightsSettings.xml
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AppInsightsSettings">
|
||||
<option name="tabSettings">
|
||||
<map>
|
||||
<entry key="Firebase Crashlytics">
|
||||
<value>
|
||||
<InsightsFilterSettings>
|
||||
<option name="connection">
|
||||
<ConnectionSetting>
|
||||
<option name="appId" value="PLACEHOLDER" />
|
||||
<option name="mobileSdkAppId" value="" />
|
||||
<option name="projectId" value="" />
|
||||
<option name="projectNumber" value="" />
|
||||
</ConnectionSetting>
|
||||
</option>
|
||||
<option name="signal" value="SIGNAL_UNSPECIFIED" />
|
||||
<option name="timeIntervalDays" value="THIRTY_DAYS" />
|
||||
<option name="visibilityType" value="ALL" />
|
||||
</InsightsFilterSettings>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
1
.idea/dictionaries/project.xml
generated
1
.idea/dictionaries/project.xml
generated
@@ -1,6 +1,7 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="project">
|
||||
<words>
|
||||
<w>hmac</w>
|
||||
<w>noteshop</w>
|
||||
<w>webscr</w>
|
||||
</words>
|
||||
|
||||
6
.idea/studiobot.xml
generated
Normal file
6
.idea/studiobot.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="StudioBotProjectSettings">
|
||||
<option name="shareContext" value="OptedIn" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1137,7 +1137,7 @@ fun AppShell(
|
||||
} else {
|
||||
val path = remember(syncFolderUriString) {
|
||||
try {
|
||||
val uri = android.net.Uri.parse(syncFolderUriString)
|
||||
val uri = Uri.parse(syncFolderUriString)
|
||||
val docFile = DocumentFile.fromTreeUri(context, uri)
|
||||
if (docFile?.name == "Noteshop") {
|
||||
val parent = docFile.parentFile
|
||||
@@ -1154,7 +1154,7 @@ fun AppShell(
|
||||
null
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
} catch (_: Exception) {
|
||||
null
|
||||
}
|
||||
}
|
||||
@@ -1954,7 +1954,7 @@ fun AppShell(
|
||||
)
|
||||
}
|
||||
is Screen.GuidedTour -> {
|
||||
de.lxtools.noteshop.ui.GuidedTourScreen(
|
||||
GuidedTourScreen(
|
||||
onTourFinished = { currentScreen = Screen.Settings }
|
||||
)
|
||||
}
|
||||
@@ -1985,7 +1985,7 @@ fun AppShell(
|
||||
val syncFolderUriString = sharedPrefs.getString("sync_folder_uri", null)
|
||||
if (syncFolderUriString != null) {
|
||||
try {
|
||||
val uri = android.net.Uri.parse(syncFolderUriString)
|
||||
val uri = Uri.parse(syncFolderUriString)
|
||||
val docFile = DocumentFile.fromTreeUri(context, uri)
|
||||
docFile?.delete()
|
||||
context.contentResolver.releasePersistableUriPermission(uri, Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_WRITE_URI_PERMISSION)
|
||||
|
||||
@@ -117,12 +117,6 @@ class NotesViewModel(private val noteshopRepository: NoteshopRepository) : ViewM
|
||||
fun updateNoteDetails(noteDetails: NoteDetails) {
|
||||
_noteDetails.value = noteDetails
|
||||
}
|
||||
|
||||
fun setDecryptedDetails(title: String, content: String) {
|
||||
_noteDetails.value = _noteDetails.value.copy(title = title, content = content)
|
||||
}
|
||||
|
||||
|
||||
suspend fun saveNote(secretKey: SecretKey?, fileEncryptor: FileEncryptor) {
|
||||
|
||||
|
||||
|
||||
@@ -118,11 +118,6 @@ class RecipesViewModel(private val noteshopRepository: NoteshopRepository) : Vie
|
||||
_recipeDetails.value = recipeDetails
|
||||
}
|
||||
|
||||
fun setDecryptedDetails(title: String, content: String) {
|
||||
_recipeDetails.value = _recipeDetails.value.copy(title = title, content = content)
|
||||
}
|
||||
|
||||
|
||||
suspend fun saveRecipe(secretKey: SecretKey?, fileEncryptor: FileEncryptor) {
|
||||
|
||||
|
||||
|
||||
@@ -192,12 +192,11 @@ fun ShoppingListDetailScreen(
|
||||
val separatorIndex = maxOf(lastCommaIndex, lastSpaceIndex)
|
||||
|
||||
val prefix = if (separatorIndex != -1) {
|
||||
currentInput.substring(0, separatorIndex + 1)
|
||||
currentInput.take(separatorIndex + 1)
|
||||
} else {
|
||||
""
|
||||
}
|
||||
val newInputValue = prefix
|
||||
viewModel.onNewItemNameChange(newInputValue)
|
||||
viewModel.onNewItemNameChange(prefix)
|
||||
}
|
||||
},
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
@@ -256,7 +255,7 @@ fun ShoppingListDetailScreen(
|
||||
state = lazyListState,
|
||||
) {
|
||||
items(itemsToDisplay, { it.id }) { item ->
|
||||
ReorderableItem(reorderableLazyListState, key = item.id) { isDragging ->
|
||||
ReorderableItem(reorderableLazyListState, key = item.id) { _ ->
|
||||
|
||||
Card(
|
||||
modifier = Modifier
|
||||
|
||||
@@ -72,7 +72,7 @@ fun ShoppingListsScreen(
|
||||
state = lazyListState,
|
||||
) {
|
||||
items(uiState.shoppingLists, { it.shoppingList.id }) { listWithItems ->
|
||||
ReorderableItem(reorderableLazyListState, key = listWithItems.shoppingList.id) { isDragging ->
|
||||
ReorderableItem(reorderableLazyListState, key = listWithItems.shoppingList.id) { _ ->
|
||||
|
||||
ShoppingListCard(
|
||||
listWithItems = listWithItems,
|
||||
|
||||
@@ -10,7 +10,7 @@ core-ktx = "1.17.0"
|
||||
room = "2.8.2"
|
||||
ksp = "2.2.20-2.0.4"
|
||||
agp = "8.13.0"
|
||||
kotlin = "2.2.20"
|
||||
kotlin = "2.2.21"
|
||||
reorderable = "3.0.0"
|
||||
biometric = "1.1.0"
|
||||
material-icons-extended = "1.7.8"
|
||||
|
||||
Reference in New Issue
Block a user