Organize imports and clean up exceptions: remove unused imports across multiple modules, replace exception variable usage with wildcard, and improve code readability.

This commit is contained in:
Stefan Mogeritsch 2026-04-13 22:03:41 +02:00
parent fb1c1ee4ce
commit 8d0d8898cb
3 changed files with 3 additions and 7 deletions

View File

@ -14,7 +14,6 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import com.sun.tools.javac.code.Type
import java.time.LocalDate import java.time.LocalDate
private val PrimaryBlue = Color(0xFF1E3A8A) private val PrimaryBlue = Color(0xFF1E3A8A)
@ -109,7 +108,7 @@ fun StammdatenTabContent(
znsField.isAccessible = true znsField.isAccessible = true
znsDataLoaded = znsField.get(turnier) as Boolean znsDataLoaded = znsField.get(turnier) as Boolean
} }
} catch (e: Exception) { } catch (_: Exception) {
// Reflection fehlgeschlagen oder Store nicht erreichbar -> Fallback auf leere Felder // Reflection fehlgeschlagen oder Store nicht erreichbar -> Fallback auf leere Felder
} }
} }
@ -428,7 +427,7 @@ fun StammdatenTabContent(
val tB = if (bis.isBlank()) tV else LocalDate.parse(bis) val tB = if (bis.isBlank()) tV else LocalDate.parse(bis)
!tV.isBefore(evV) && !tB.isAfter(evB) && !tB.isBefore(tV) !tV.isBefore(evV) && !tB.isAfter(evB) && !tB.isBefore(tV)
} }
} catch (e: Exception) { false } } catch (_: Exception) { false }
} }
AssistChip(onClick = {}, label = { Text("Datum gültig") }, leadingIcon = { AssistChip(onClick = {}, label = { Text("Datum gültig") }, leadingIcon = {
Icon(if (dateOk) Icons.Default.Check else Icons.Default.Close, null, tint = if (dateOk) Color(0xFF2E7D32) else MaterialTheme.colorScheme.error) Icon(if (dateOk) Icons.Default.Check else Icons.Default.Close, null, tint = if (dateOk) Color(0xFF2E7D32) else MaterialTheme.colorScheme.error)
@ -447,7 +446,7 @@ fun StammdatenTabContent(
val tB = if (bis.isBlank()) tV else LocalDate.parse(bis) val tB = if (bis.isBlank()) tV else LocalDate.parse(bis)
!tV.isBefore(evV) && !tB.isAfter(evB) && !tB.isBefore(tV) !tV.isBefore(evV) && !tB.isAfter(evB) && !tB.isBefore(tV)
} }
} catch (e: Exception) { false } } catch (_: Exception) { false }
base && dateValid base && dateValid
}, },
colors = ButtonDefaults.buttonColors(containerColor = PrimaryBlue), colors = ButtonDefaults.buttonColors(containerColor = PrimaryBlue),

View File

@ -5,8 +5,6 @@ import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.window.singleWindowApplication import androidx.compose.ui.window.singleWindowApplication
import at.mocode.frontend.features.verein.presentation.VereinScreen
import at.mocode.frontend.features.verein.presentation.VereinViewModel
/** /**
* Hot-Reload Preview Entry Point * Hot-Reload Preview Entry Point

View File

@ -6,7 +6,6 @@ import androidx.compose.foundation.lazy.items
import androidx.compose.material.icons.Icons import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.OpenInNew import androidx.compose.material.icons.automirrored.filled.OpenInNew
import androidx.compose.material.icons.filled.Description import androidx.compose.material.icons.filled.Description
import androidx.compose.material.icons.filled.OpenInNew
import androidx.compose.material3.* import androidx.compose.material3.*
import androidx.compose.runtime.* import androidx.compose.runtime.*
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment