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:
parent
b611e7a213
commit
e20162ad36
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue