-
Notifications
You must be signed in to change notification settings - Fork 173
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 add functional search into new file manager sample **Changes** - Add search into file manager - Fix internal visibility for ComposableSearchBar **Test plan** - Open some folder with sample - Try press search button - See search elements with cool animations
- Loading branch information
1 parent
32ee072
commit 7229ee6
Showing
30 changed files
with
826 additions
and
38 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
19 changes: 19 additions & 0 deletions
19
components/core/ktx/src/commonMain/kotlin/com/flipperdevices/core/ktx/jre/DelayFlowKtx.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,19 @@ | ||
package com.flipperdevices.core.ktx.jre | ||
|
||
import kotlinx.coroutines.FlowPreview | ||
import kotlinx.coroutines.flow.Flow | ||
import kotlinx.coroutines.flow.debounce | ||
import kotlinx.coroutines.flow.map | ||
import kotlinx.coroutines.flow.withIndex | ||
import kotlin.time.Duration | ||
|
||
@OptIn(FlowPreview::class) | ||
fun <T> Flow<T>.debounceAfterFirst(timeout: Duration): Flow<T> { | ||
return withIndex().debounce { | ||
if (it.index == 0) { | ||
0L | ||
} else { | ||
timeout.inWholeMilliseconds | ||
} | ||
}.map { it.value } | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
plugins { | ||
id("flipper.multiplatform") | ||
id("flipper.multiplatform-dependencies") | ||
} | ||
|
||
android.namespace = "com.flipperdevices.filemanager.search.api" | ||
|
||
commonDependencies { | ||
implementation(projects.components.core.ui.decompose) | ||
|
||
implementation(libs.compose.ui) | ||
implementation(libs.decompose) | ||
|
||
implementation(libs.okio) | ||
} |
Oops, something went wrong.