Compare commits

...

2 Commits

Author SHA1 Message Date
463e9b6258 Updated .gitignore
The `.gitignore` file has been reorganized and expanded to include standard exclusions for build artifacts, Kotlin/Java project files, Android Studio metadata, keys/secrets, and OS-generated files.
2026-02-27 19:26:25 +01:00
e99e951232 Updated Login and Git configuration
The `LoginViewModel` now trims whitespace from usernames during the login request and account creation process.

The `.gitignore` file has been updated to exclude `.jks` files and the `/app/release` directory.
2026-02-27 19:23:04 +01:00
2 changed files with 36 additions and 11 deletions

43
.gitignore vendored
View File

@@ -1,11 +1,36 @@
# Build artifacts
bin/
gen/
out/
build/
app/build/
# Kotlin / Java
*.iml *.iml
.gradle *.ipr
/local.properties *.iws
/.idea .idea/
.DS_Store .gradle/
/build
/captures
.externalNativeBuild
.cxx
local.properties local.properties
/app/build
# Android Studio
captures/
.externalNativeBuild/
.cxx/
.navigation/
# Keys & Secrets
*.jks
*.keystore
*.p12
google-services.json
# OS generated files
.DS_Store
Thumbs.db
# Log files
*.log
# Bundle/Release
/app/release/

View File

@@ -30,7 +30,7 @@ class LoginViewModel(private val prefs: UserPreferences, private val appContext:
try { try {
val response = withContext(Dispatchers.IO) { val response = withContext(Dispatchers.IO) {
api.login(LoginRequest(username.lowercase(getDefault()), password)) api.login(LoginRequest(username.lowercase(getDefault()).trim(), password))
} }
if(response.isSuccessful) { if(response.isSuccessful) {
@@ -45,7 +45,7 @@ class LoginViewModel(private val prefs: UserPreferences, private val appContext:
val account = Account( val account = Account(
id = UUID.fromString(body.user.id), id = UUID.fromString(body.user.id),
name = username, name = username.trim(),
wgName = body.wgName, wgName = body.wgName,
avatarUrl = null, avatarUrl = null,
serverUrl = serverUrl, serverUrl = serverUrl,