-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Background** This PR aims to improve new file manager uploading reactivity and fix ui for multiple files **Changes** - Remove upload screen and replace it with component - Add callbacks for uploaded file progreess - will now be updated in items list - Fix multiple files upload display **Test plan** - Try upload one file fully and see it will appear in list instantly - Try upload one file but cancel it in progress. See it also appeared, but with non-full upload size - Try upload multiple files
- Loading branch information
1 parent
bc9d06f
commit b5f3df1
Showing
20 changed files
with
263 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...pi/src/commonMain/kotlin/com/flipperdevices/filemanager/upload/api/MultipleFilesPicker.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.flipperdevices.filemanager.upload.api | ||
|
||
fun interface MultipleFilesPicker { | ||
fun startFilePicker() | ||
} |
17 changes: 11 additions & 6 deletions
17
...c/commonMain/kotlin/com/flipperdevices/filemanager/upload/api/UploadDecomposeComponent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
package com.flipperdevices.filemanager.upload.api | ||
|
||
import androidx.compose.runtime.Composable | ||
import com.arkivanov.decompose.ComponentContext | ||
import com.flipperdevices.ui.decompose.ScreenDecomposeComponent | ||
import com.flipperdevices.bridge.connection.feature.storage.api.model.ListingItem | ||
import okio.Path | ||
|
||
abstract class UploadDecomposeComponent( | ||
componentContext: ComponentContext | ||
) : ScreenDecomposeComponent(componentContext) { | ||
interface UploadDecomposeComponent { | ||
|
||
@Composable | ||
fun rememberMultipleFilesPicker(path: Path): MultipleFilesPicker | ||
|
||
@Composable | ||
fun Render() | ||
|
||
fun interface Factory { | ||
operator fun invoke( | ||
componentContext: ComponentContext, | ||
path: Path, | ||
onFinish: () -> Unit | ||
onFilesChanged: (List<ListingItem>) -> Unit, | ||
): UploadDecomposeComponent | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.