mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Make the functions in SystemUtils extensions (#899)
- They are now all extensions over `Context` or `Activity` (when `Context` is not enough) (some of them already were). - Allows for IDE completion.
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
package io.element.android.appnav.loggedin
|
||||
|
||||
import android.app.Activity
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
@@ -32,14 +31,12 @@ fun LoggedInView(
|
||||
state: LoggedInState,
|
||||
modifier: Modifier = Modifier
|
||||
) {
|
||||
val activity = LocalContext.current as? Activity
|
||||
val context = LocalContext.current
|
||||
|
||||
PermissionsView(
|
||||
state = state.permissionsState,
|
||||
modifier = modifier,
|
||||
openSystemSettings = {
|
||||
activity?.let { openAppSettingsPage(it) }
|
||||
}
|
||||
openSystemSettings = context::openAppSettingsPage
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user