Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
w2sv committed Aug 4, 2024
2 parents e92532b + 686f698 commit aab6f68
Show file tree
Hide file tree
Showing 129 changed files with 3,119 additions and 1,882 deletions.
42 changes: 42 additions & 0 deletions .idea/androidTestResultsUserPreferences.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 24 additions & 1 deletion .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ composeCompiler {

// https://github.com/Triple-T/gradle-play-publisher
play {
serviceAccountCredentials.set(file("service-account-key.json"))
// serviceAccountCredentials.set(file("service-account-key.json"))
defaultToAppBundles.set(true)
artifactDir.set(file("build/outputs/bundle/release"))
}
Expand Down Expand Up @@ -158,5 +158,5 @@ dependencies {

// Android Test
androidTestImplementation(libs.androidx.compose.ui.test)
androidTestImplementation(libs.rules)
androidTestImplementation(libs.androidx.test.rules)
}
14 changes: 7 additions & 7 deletions app/src/main/kotlin/com/w2sv/filenavigator/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ import com.ramcosta.composedestinations.navigation.popUpTo
import com.ramcosta.composedestinations.utils.isRouteOnBackStack
import com.w2sv.composed.OnChange
import com.w2sv.domain.model.Theme
import com.w2sv.filenavigator.ui.sharedviewmodels.AppViewModel
import com.w2sv.filenavigator.ui.sharedviewmodels.NavigatorViewModel
import com.w2sv.filenavigator.ui.states.rememberObservedPostNotificationsPermissionState
import com.w2sv.filenavigator.ui.viewmodel.AppViewModel
import com.w2sv.filenavigator.ui.viewmodel.NavigatorViewModel
import com.w2sv.filenavigator.ui.state.rememberObservedPostNotificationsPermissionState
import com.w2sv.filenavigator.ui.theme.AppTheme
import com.w2sv.filenavigator.ui.utils.LocalDocumentUriToPathConverter
import com.w2sv.filenavigator.ui.utils.LocalNavHostController
import com.w2sv.filenavigator.ui.utils.LocalUseDarkTheme
import com.w2sv.filenavigator.ui.util.LocalMoveDestinationPathConverter
import com.w2sv.filenavigator.ui.util.LocalNavHostController
import com.w2sv.filenavigator.ui.util.LocalUseDarkTheme
import com.w2sv.kotlinutils.coroutines.collectFromFlow
import com.w2sv.navigator.FileNavigator
import com.w2sv.navigator.system_action_broadcastreceiver.BootCompletedReceiver
Expand Down Expand Up @@ -119,7 +119,7 @@ class MainActivity : ComponentActivity() {

CompositionLocalProvider(
LocalNavHostController provides navController,
LocalDocumentUriToPathConverter provides appVM.documentUriToPathConverter
LocalMoveDestinationPathConverter provides appVM.moveDestinationPathConverter
) {
Surface(modifier = Modifier.fillMaxSize()) {
DestinationsNavHost(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.Dp
import com.w2sv.filenavigator.ui.utils.Easing
import com.w2sv.filenavigator.ui.util.Easing

@Immutable
data class BorderAnimationState(val width: () -> Dp, val color: () -> Color) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package com.w2sv.filenavigator.ui.designsystem
import androidx.compose.ui.unit.dp

object Spacing {
val VerticalItemRow = 20.dp
val VerticalItemRow = 22.dp
}
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
package com.w2sv.filenavigator.ui.designsystem.drawer

import androidx.compose.foundation.layout.Column
import androidx.compose.material3.Icon
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.w2sv.domain.model.FileType
import com.w2sv.filenavigator.R
import com.w2sv.filenavigator.ui.model.color

object IconSize {
Expand All @@ -33,20 +24,20 @@ fun FileTypeIcon(fileType: FileType, modifier: Modifier = Modifier, tint: Color
)
}

@Composable
fun AutoMoveIcon(modifier: Modifier = Modifier, tint: Color = LocalContentColor.current) {
Column(horizontalAlignment = Alignment.CenterHorizontally, modifier = modifier) {
CompositionLocalProvider(LocalContentColor provides tint) {
Icon(
painter = painterResource(id = com.w2sv.core.navigator.R.drawable.ic_app_logo_24),
contentDescription = null
)
Text(
text = stringResource(id = R.string.auto),
fontSize = 12.sp,
lineHeight = 6.sp,
fontWeight = FontWeight.Medium
)
}
}
}
//@Composable
//fun AutoMoveIcon(modifier: Modifier = Modifier, tint: Color = LocalContentColor.current) {
// Column(horizontalAlignment = Alignment.CenterHorizontally, modifier = modifier) {
// CompositionLocalProvider(LocalContentColor provides tint) {
// Icon(
// painter = painterResource(id = com.w2sv.core.navigator.R.drawable.ic_app_logo_24),
// contentDescription = null
// )
// Text(
// text = stringResource(id = R.string.auto),
// fontSize = 12.sp,
// lineHeight = 6.sp,
// fontWeight = FontWeight.Medium
// )
// }
// }
//}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import com.w2sv.filenavigator.R
import com.w2sv.filenavigator.ui.designsystem.ItemRowDefaults
import com.w2sv.filenavigator.ui.designsystem.RightAligned
import com.w2sv.filenavigator.ui.theme.onSurfaceVariantDecreasedAlpha
import com.w2sv.filenavigator.ui.utils.LocalNavHostController
import com.w2sv.filenavigator.ui.util.LocalNavHostController
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.w2sv.domain.model.Theme
import com.w2sv.filenavigator.ui.sharedviewmodels.AppViewModel
import com.w2sv.filenavigator.ui.utils.activityViewModel
import com.w2sv.filenavigator.ui.viewmodel.AppViewModel
import com.w2sv.filenavigator.ui.util.activityViewModel

@Stable
data class AppPreferences(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import com.w2sv.filenavigator.ui.designsystem.drawer.IconSize
import com.w2sv.filenavigator.ui.designsystem.drawer.ThemeSelectionRow
import com.w2sv.filenavigator.ui.designsystem.drawer.model.AppPreferences
import com.w2sv.filenavigator.ui.designsystem.drawer.model.rememberAppPreferences
import com.w2sv.filenavigator.ui.utils.LocalUseDarkTheme
import com.w2sv.filenavigator.ui.util.LocalUseDarkTheme

@OptIn(ExperimentalLayoutApi::class)
@Destination<RootGraph>(style = NavigationTransitions::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import com.w2sv.filenavigator.ui.designsystem.drawer.drawerRepelledAnimation
import com.w2sv.filenavigator.ui.designsystem.drawer.rememberDrawerRepelledAnimationState
import com.w2sv.filenavigator.ui.screens.home.components.movehistory.MoveHistoryCard
import com.w2sv.filenavigator.ui.screens.home.components.statusdisplay.NavigatorStatusCard
import com.w2sv.filenavigator.ui.utils.ModifierReceivingComposable
import com.w2sv.filenavigator.ui.utils.rememberMovableContentOf
import com.w2sv.filenavigator.ui.util.ModifierReceivingComposable
import com.w2sv.filenavigator.ui.util.rememberMovableContentOf
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,12 @@ import androidx.lifecycle.Lifecycle
import com.w2sv.composed.OnLifecycleEvent
import com.w2sv.composed.extensions.thenIf
import com.w2sv.domain.model.MoveEntry
import com.w2sv.domain.usecase.DocumentUriToPathConverter
import com.w2sv.domain.usecase.MoveDestinationPathConverter
import com.w2sv.filenavigator.R
import com.w2sv.filenavigator.ui.designsystem.WeightedBox
import com.w2sv.filenavigator.ui.model.color
import com.w2sv.filenavigator.ui.model.movedFileExists
import com.w2sv.filenavigator.ui.screens.home.components.movehistory.model.rememberFirstDateRepresentations
import com.w2sv.filenavigator.ui.utils.LocalDocumentUriToPathConverter
import com.w2sv.filenavigator.ui.util.LocalMoveDestinationPathConverter
import eu.wewox.textflow.TextFlow
import kotlinx.collections.immutable.ImmutableList
import kotlinx.coroutines.CoroutineScope
Expand Down Expand Up @@ -95,7 +94,7 @@ private fun MoveEntryView(
onClick: suspend (MoveEntry, Boolean) -> Unit,
modifier: Modifier = Modifier,
context: Context = LocalContext.current,
documentUriToPathConverter: DocumentUriToPathConverter = LocalDocumentUriToPathConverter.current,
moveDestinationPathConverter: MoveDestinationPathConverter = LocalMoveDestinationPathConverter.current,
scope: CoroutineScope = rememberCoroutineScope()
) {
var movedFileExists by remember(moveEntry) {
Expand Down Expand Up @@ -144,9 +143,9 @@ private fun MoveEntryView(
}
WeightedBox(weight = 0.5f) {
Text(
text = remember(moveEntry.destinationDocumentUri) {
documentUriToPathConverter.invoke(
moveEntry.destinationDocumentUri,
text = remember(moveEntry.destination) {
moveDestinationPathConverter.invoke(
moveEntry.destination,
context
)!!
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ import com.w2sv.filenavigator.ui.designsystem.LocalSnackbarHostState
import com.w2sv.filenavigator.ui.designsystem.SnackbarAction
import com.w2sv.filenavigator.ui.designsystem.SnackbarKind
import com.w2sv.filenavigator.ui.model.launchViewActivity
import com.w2sv.filenavigator.ui.sharedviewmodels.MoveHistoryViewModel
import com.w2sv.filenavigator.ui.viewmodel.MoveHistoryViewModel
import com.w2sv.filenavigator.ui.theme.onSurfaceVariantDecreasedAlpha
import com.w2sv.filenavigator.ui.utils.activityViewModel
import com.w2sv.filenavigator.ui.util.activityViewModel
import kotlinx.collections.immutable.toImmutableList

@Composable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.w2sv.filenavigator.ui.screens.home.components.movehistory.model
package com.w2sv.filenavigator.ui.screens.home.components.movehistory

import android.content.Context
import androidx.annotation.VisibleForTesting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ import com.ramcosta.composedestinations.generated.destinations.NavigatorSettings
import com.ramcosta.composedestinations.navigation.navigate
import com.w2sv.filenavigator.R
import com.w2sv.filenavigator.ui.designsystem.AppCardDefaults
import com.w2sv.filenavigator.ui.sharedviewmodels.NavigatorViewModel
import com.w2sv.filenavigator.ui.viewmodel.NavigatorViewModel
import com.w2sv.filenavigator.ui.theme.AppColor
import com.w2sv.filenavigator.ui.theme.DefaultAnimationDuration
import com.w2sv.filenavigator.ui.utils.Easing
import com.w2sv.filenavigator.ui.utils.LocalNavHostController
import com.w2sv.filenavigator.ui.utils.activityViewModel
import com.w2sv.filenavigator.ui.util.Easing
import com.w2sv.filenavigator.ui.util.LocalNavHostController
import com.w2sv.filenavigator.ui.util.activityViewModel
import com.w2sv.navigator.FileNavigator

@Composable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.w2sv.filenavigator.ui.screens.missingpermissions

import android.content.Context
import android.os.Build
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
Expand Down Expand Up @@ -39,10 +38,10 @@ import com.w2sv.composed.permissions.extensions.launchPermissionRequest
import com.w2sv.filenavigator.R
import com.w2sv.filenavigator.ui.designsystem.NavigationTransitions
import com.w2sv.filenavigator.ui.designsystem.TopAppBarAboveHorizontalDivider
import com.w2sv.filenavigator.ui.sharedviewmodels.AppViewModel
import com.w2sv.filenavigator.ui.states.PostNotificationsPermissionState
import com.w2sv.filenavigator.ui.utils.ModifierReceivingComposable
import com.w2sv.filenavigator.ui.utils.activityViewModel
import com.w2sv.filenavigator.ui.state.PostNotificationsPermissionState
import com.w2sv.filenavigator.ui.util.ModifierReceivingComposable
import com.w2sv.filenavigator.ui.util.activityViewModel
import com.w2sv.filenavigator.ui.viewmodel.AppViewModel
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.toPersistentList

Expand Down Expand Up @@ -167,9 +166,7 @@ private fun rememberMovablePermissionCards(
iconRes = R.drawable.ic_folder_open_24,
textRes = R.string.manage_external_storage_permission_rational,
onGrantButtonClick = {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
goToManageExternalStorageSettings(context)
}
goToManageExternalStorageSettings(context)
}
)
)
Expand Down
Loading

0 comments on commit aab6f68

Please sign in to comment.