-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add conditional for adding space between feed's sort type
- Loading branch information
Ali Rezaei
committed
Mar 15, 2024
1 parent
e968561
commit 05496b7
Showing
2 changed files
with
14 additions
and
1 deletion.
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
10 changes: 10 additions & 0 deletions
10
app/src/main/java/com/sample/android/tmdb/util/ModifierExt.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,10 @@ | ||
package com.sample.android.tmdb.util | ||
|
||
import androidx.compose.ui.Modifier | ||
|
||
fun Modifier.conditional(condition: Boolean, modifier: Modifier.() -> Modifier): Modifier = | ||
if (condition) { | ||
then(modifier(Modifier)) | ||
} else { | ||
this | ||
} |