Format project
This commit is contained in:
parent
e9a3dec6e9
commit
a413b635d1
142 changed files with 840 additions and 518 deletions
|
|
@ -4,4 +4,4 @@ import com.airbnb.android.showkase.annotation.ShowkaseRoot
|
|||
import com.airbnb.android.showkase.annotation.ShowkaseRootModule
|
||||
|
||||
@ShowkaseRoot
|
||||
class ElementRootModule : ShowkaseRootModule
|
||||
class ElementRootModule : ShowkaseRootModule
|
||||
|
|
@ -29,4 +29,4 @@ class ElementXApplication : Application(), ImageLoaderFactory {
|
|||
}
|
||||
.build()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,15 @@ import androidx.compose.foundation.layout.padding
|
|||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Close
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
|
|
@ -106,7 +113,6 @@ class MainActivity : ComponentActivity() {
|
|||
OnLifecycleEvent { _, event ->
|
||||
Timber.v("OnLifecycleEvent: $event")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
|
@ -165,5 +171,4 @@ class MainActivity : ComponentActivity() {
|
|||
fun MainContentPreview() {
|
||||
MainContent(startRoute = OnBoardingScreenNavigationDestination)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,14 +13,14 @@ class MainViewModel : ViewModel() {
|
|||
return matrix.isLoggedIn().first()
|
||||
}
|
||||
|
||||
fun startSyncIfLogged(){
|
||||
fun startSyncIfLogged() {
|
||||
viewModelScope.launch {
|
||||
if(!isLoggedIn()) return@launch
|
||||
if (!isLoggedIn()) return@launch
|
||||
matrix.activeClient().startSync()
|
||||
}
|
||||
}
|
||||
|
||||
fun stopSyncIfLogged(){
|
||||
fun stopSyncIfLogged() {
|
||||
viewModelScope.launch {
|
||||
if (!isLoggedIn()) return@launch
|
||||
matrix.activeClient().stopSync()
|
||||
|
|
@ -31,4 +31,4 @@ class MainViewModel : ViewModel() {
|
|||
matrix.restoreSession()
|
||||
matrix.activeClient().startSync()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,6 +77,3 @@ fun RoomListScreenNavigation(navigator: DestinationsNavigator) {
|
|||
fun MessagesScreenNavigation(roomId: String, navigator: DestinationsNavigator) {
|
||||
MessagesScreen(roomId, navigator::navigateUp)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue