Refactor: Remove unused code and update variable names

- Remove unused `RevoltTweenColour` animation spec.
- Remove KDoc for `isServerAlreadyJoined` function.
- Change exception variable names to `_` to indicate they are unused.
This commit is contained in:
AbronStudio 2025-08-06 10:55:06 +03:30
parent b611e7a213
commit e20162ad36
2 changed files with 2 additions and 8 deletions

View File

@ -166,7 +166,7 @@ class MainActivityViewModel @Inject constructor(
try {
val res = RevoltHttp.get("/".api())
return res.status.value == 200
} catch (e: Exception) {
} catch (_: Exception) {
return false
}
}
@ -225,7 +225,7 @@ class MainActivityViewModel @Inject constructor(
val canReachRevolt = canReachRevolt()
val valid = try {
RevoltAPI.checkSessionToken(token)
} catch (e: Throwable) {
} catch (_: Throwable) {
false
}
@ -430,7 +430,6 @@ class MainActivity : AppCompatActivity() {
val RevoltTweenInt: FiniteAnimationSpec<IntOffset> = tween(400, easing = EaseInOutExpo)
val RevoltTweenFloat: FiniteAnimationSpec<Float> = tween(400, easing = EaseInOutExpo)
val RevoltTweenDp: FiniteAnimationSpec<Dp> = tween(400, easing = EaseInOutExpo)
val RevoltTweenColour: FiniteAnimationSpec<Color> = tween(400, easing = EaseInOutExpo)
val NavTweenInt: FiniteAnimationSpec<IntOffset> = tween(350, easing = EaseInOutExpo)
val NavTweenFloat: FiniteAnimationSpec<Float> = tween(350, easing = EaseInOutExpo)

View File

@ -138,11 +138,6 @@ fun DiscoverServersList(
}
}
/**
* Check if the server with the given invite code is already joined
* @param inviteCode The invite code of the server
* @return True if the server is already joined, false otherwise
*/
@Composable
private fun isServerAlreadyJoined(serverId: String): Boolean {
// Check if the server exists in RevoltAPI.serverCache