Skip to content

Commit

Permalink
chore: Fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
tevincent committed Nov 27, 2024
1 parent dcaa397 commit 0f4fb38
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.runtime.remember
import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.infomaniak.multiplatform_swisstransfer.common.interfaces.ui.TransferUi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ fun TransferDetailsScreen(
setFileCheckStatus = { fileUid, isChecked ->
transferDetailsViewModel.checkedFiles[fileUid] = isChecked
},
navigateToFilesDetails = navigateToFilesDetails,
)
}
}
Expand All @@ -94,11 +95,10 @@ private fun TransferDetailsScreen(
direction: TransferDirection,
navigateBack: (() -> Unit)?,
getTransfer: () -> TransferUi,
navigateToFilesDetails: ((transferUuid: String, fileUuid: String) -> Unit)? = null,
isFileChecked: (String) -> Boolean,
getCheckedFiles: () -> SnapshotStateMap<String, Boolean>,
clearCheckedFiles: () -> Unit,
setFileCheckStatus: (String, Boolean) -> Unit,
navigateToFilesDetails: ((transferUuid: String, fileUuid: String) -> Unit)? = null,
) {

val context = LocalContext.current
Expand All @@ -122,13 +122,13 @@ private fun TransferDetailsScreen(
Column {

FilesList(
getTransfer,
transferRecipients,
isMultiselectOn,
getCheckedFiles,
setFileCheckStatus,
getTransfer,
transferRecipients,
isMultiselectOn,
getCheckedFiles,
setFileCheckStatus,
navigateToFilesDetails,
)
)

BottomBar(
direction = direction,
Expand Down Expand Up @@ -190,7 +190,7 @@ private fun ColumnScope.FilesList(
setFileCheckStatus(fileUid, isChecked)
},
onClick = { fileUuid ->
navigateToFilesDetails?.invoke(transfer.uuid, fileUuid)
navigateToFilesDetails?.invoke(getTransfer().uuid, fileUuid)
},
header = {
Column {
Expand Down Expand Up @@ -319,6 +319,7 @@ private fun Preview(@PreviewParameter(TransferUiListPreviewParameter::class) tra
getCheckedFiles = { mutableStateMapOf() },
clearCheckedFiles = {},
setFileCheckStatus = { _, _ -> },
navigateToFilesDetails = { _, _ -> },
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,14 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.infomaniak.multiplatform_swisstransfer.common.models.TransferDirection
import com.infomaniak.multiplatform_swisstransfer.managers.TransferManager
import com.infomaniak.multiplatform_swisstransfer.network.models.transfer.ContainerApi
import com.infomaniak.multiplatform_swisstransfer.network.models.transfer.FileApi
import com.infomaniak.multiplatform_swisstransfer.network.models.transfer.TransferApi
import com.infomaniak.sentry.SentryLog
import com.infomaniak.swisstransfer.di.IoDispatcher
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.launch
import javax.inject.Inject

@HiltViewModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import com.infomaniak.multiplatform_swisstransfer.common.utils.mapToList
import com.infomaniak.multiplatform_swisstransfer.data.NewUploadSession
import com.infomaniak.multiplatform_swisstransfer.managers.AppSettingsManager
import com.infomaniak.multiplatform_swisstransfer.managers.FileManager
import com.infomaniak.multiplatform_swisstransfer.managers.TransferManager
import com.infomaniak.multiplatform_swisstransfer.managers.UploadManager
import com.infomaniak.sentry.SentryLog
import com.infomaniak.swisstransfer.di.IoDispatcher
Expand Down

0 comments on commit 0f4fb38

Please sign in to comment.