forked from Automattic/pocket-casts-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added "Skip to Time" and "Play Next In Queue" commands to "Control Pl…
…ayback" Tasker action and cleaned up some code - Added "Skip to Time" and "Play Next In Queue" commands to "Control Playback" Tasker action - Updated Changelog - In the Tasker action configuration screen: - Allowed only either the variable selection or the item selection dropdown to show at a time - Don't show duplicate Tasker variables and sort them alphabetically - Allow user to dismiss dropdown menus by clicking away from them - Changed keyboard IME action to "Done" - Changed Variable Select icon to be the same as in Tasker itself - Made dropdown size limited so it shows correctly in all circumstances - Added auxiliary "OptionalField" class in the "ViewModelConfigControlPlayback" class so that optional input fields that depend on the type of command being used can very easily be added with minimal code
- Loading branch information
Showing
15 changed files
with
165 additions
and
346 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
15 changes: 15 additions & 0 deletions
15
...taskerplugin/src/main/java/au/com/shiftyjelly/pocketcasts/taskerplugin/base/Extensions.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,8 +1,23 @@ | ||
package au.com.shiftyjelly.pocketcasts.taskerplugin.base | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.platform.LocalConfiguration | ||
import androidx.compose.ui.unit.DpSize | ||
import androidx.compose.ui.unit.dp | ||
|
||
val String?.nullIfEmpty get() = if (isNullOrEmpty()) null else this | ||
fun <T> tryOrNull(handleError: ((Throwable) -> T?)? = null, block: () -> T?): T? = try { | ||
block() | ||
} catch (t: Throwable) { | ||
handleError?.invoke(t) | ||
} | ||
|
||
val screenSize | ||
@Composable | ||
get() :DpSize { | ||
val configuration = LocalConfiguration.current | ||
|
||
val screenHeight = configuration.screenHeightDp.dp | ||
val screenWidth = configuration.screenWidthDp.dp | ||
return DpSize(width = screenWidth, height = screenHeight) | ||
} |
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
Oops, something went wrong.