Skip to content

Releases: ComposeGears/Tiamat

Tiamat 1.2.0

07 Oct 00:01
Compare
Choose a tag to compare

General

  • enable explicitApi #52 for library modules
  • Add support SavedStateHandle for TiamatViewModel #49
  • add rememberSaveableViewModel & koinSaveableTiamatViewModel functions to create saveable view models

Version updates

kotlin = 2.0.0 -> 2.0.20
koin-compose = 4.0.0-RC1 -> 4.0.0

Examples

  • update ViewModels examples with saveable models

Fixes

  • ComposeModelCoroutineScope marked as internal (was unintended visible outside of library)
  • TiamatViewModel.viewModelScope type changed from ComposeModelCoroutineScope -> CoroutineScope

Full Changelog: release/v1.1.1...release/v1.2.0

Tiamat 1.1.1

01 Aug 09:36
Compare
Choose a tag to compare

Fixes

  • fix sample app may crash when: StorageMode=SaveState + send deeplink + notCleartFreeArgs ( DeeplinkData class was not parcelable, now it is) + use don't keep activities system mode + hide app
  • fix freeArgs & navResult uses remember and not provides new state upon clear (it is was cleared under the hood tho).

Changes

  • freeArgs & navResult are now State, calling clear(NavResult/FreeArgs) functions will cause state to update and recompose related composables

Contributors

Special thanks to: @maxlordks

Full Changelog: release/v1.1.0...release/v1.1.1

Tiamat 1.1.0

29 Jul 16:26
Compare
Choose a tag to compare

General

  • add clearNavResult (#33) to be able clear passed nav result (eg: using result to perform 1-time-action and clear it not to handle again during navigation)
  • add NavController .getSavedState and NavController .loadFromSavedState functions to be able store/resore state manually
  • add NavController.popToTop(... orElse: NavController.() -> Unit) param to be able manually handle situation when there is nothing to pop to, default value will navigate to target destination
  • refactor NavController.back functions to work better with nullability
  • BackStackEditScope got removeRecent and removeAll functions to make it easyer to edit backstack
  • update dependencies

IMPORTANT

  • "io.insert-koin:koin-compose:4.0.0-RC1" - tiamat-koint use RC1 version of koin dependency

Examples

  • add WASM target (yep, you can run it in the browser now)
  • add Koin integration example (to be clear - we move it from specific platforms into general due to koint is now support wasm)
  • add CustomStateSaver, example of how to manually store/restore navController state (you can save it to file if you want)

Fixes

  • fix app silent-crush on Android when using ResetOnDataLoss storage mode together with unbundelable classes in params

Changes

  • renamed StorageMode.Savable -> StorageMode.SavedState as it was a confusion, name did not represent actual storage place
  • renamed StorageMode.ResetOnDataLoss -> StorageMode.Memory as it was a confusion, name did not represent actual storage place

Full Changelog: release/v1.1.0-rc02...release/v1.1.0

Tiamat 1.1.0-rc02

30 May 10:17
Compare
Choose a tag to compare

General

  • Version changes:
    • jetbrains-compose: 1.6.2 -> 1.6.10
    • kotlin: 1.9.23 -> 2.0.0
    • io.insert-koin:koin-core: 3.5.4 -> 3.5.6

Examples

  • refactor example app structure, external libraries features may be added to specified (supported) platforms
  • add Wasm example
  • separates koin example from others (Wasm support not yet released from early version)

New

  • Wasm support
  • Add back navController's action now contains inclusive param, used together with back(to = ??, inclusive=??)
  • NavDestinationScope is now implements AnimatedVisibilityScope and supported android shared transition (ps shared transition is till bugged when use more than 3 states, see https://issuetracker.google.com/issues/341909321)

Known issues on Android

  • java.lang.IllegalStateException: CompositionLocal LocalLifecycleOwner not present

workaround is to add this into root app element :

@Composable
private fun LocalLifecycleWorkaround(content: @Composable () -> Unit) {
    CompositionLocalProvider(
        androidx.lifecycle.compose.LocalLifecycleOwner provides androidx.compose.ui.platform.LocalLifecycleOwner.current,
        content = content
    )
}

More details: https://issuetracker.google.com/issues/336842920#comment14

Tiamat 1.1.0-rc01

15 Apr 13:28
15107ad
Compare
Choose a tag to compare

General

  • Refactor in-memory storage from using "cache to Map<,>" to "hold same object instance in memory"
  • NavDestinationEntry removed (replaced with NavEntry)
  • NavEntry - marked as public class, provides actual entry data (destination + args) and extension-create-fun
  • StorageMode :
    • changed to enum
    • IgnoreDataLoss storage mode - removed as useless
  • rememberNavController:
    • onCreated renamed to configuration to better represent actual behavior (called after both create and restore actions)
  • NavController.getBackStack new return List<NavEntry<*>> (actual instances of entries)
  • NavController.currentNavEntry marked as public and now can be read/observed

Fixes

  • fix koin may create duplicate of viewmodels

New

  • Add rememberSharedViewModel and koinSharedTiamatViewModel shared (scoped into current/provided navController) view model access
  • Extend viewmodels examples with shared model usage example

Tiamat 1.0.4

02 Apr 08:51
Compare
Choose a tag to compare

Fixes

  • Fix NavController + Savable storage mode may start blank

Tiamat + Tiamat-koin v1.0.3

25 Mar 14:23
4dc5247
Compare
Choose a tag to compare

General

  • JB Compose version up 1.6.1
  • Kotlin version up 1.9.23
  • Add NavDestinationEntry class to represent NavDestination within navArgs + freeArgs
// building NavDestinationEntry

// constructor
val de : NavDestinationEntry = NavDestinationEntry(SomeScreen, navArgsValue , freeArgsValue)
// base ext
val de : NavDestinationEntry = SomeScreen.toEntry(navArgsValue , freeArgsValue)
// ext functuions
val de : NavDestinationEntry = SomeScreen.navArgs(navArgsValue).freeArgs(freeArgsValue)
// infix form
val de : NavDestinationEntry = SomeScreen navArgs navArgsValue freeArgs freeArgsValue
  • Add rememberNavController overloads to be able to pass initial navArgs/freeArgs
// flat args
fun <T> rememberNavController(
    key: String? = null,
    storageMode: StorageMode? = null,
    startDestination: NavDestination<T>?,
    startDestinationNavArgs: T? = null,
    startDestinationFreeArgs: Any? = null,
    destinations: Array<NavDestination<*>>,
    onCreated: NavController.() -> Unit = {}
)

// bundled args
fun <T> rememberNavController(
    key: String? = null,
    storageMode: StorageMode? = null,
    startDestination: NavDestinationEntry<T>?,
    destinations: Array<NavDestination<*>>,
    onCreated: NavController.() -> Unit = {}
)
  • Add onCreated: NavController.() -> Unit = {} into rememberNavController optional param to be able self configure controller right after being created/restored. Common usage is to perform initial navigation. See deep-link example
  • Improve NavEntry by making it generic class to mirror (as internal item) NavDestinationEntry
  • Add NavController.findNavController(key: String): NavController? fun to find parent[or current] navController within provided key
  • Add NavController.getBackStackEntries():List<NavDestinationEntry> to get back stack entries (dest + args)

Examples

Fixes

  • Fix NavContentTransform animations may have size transform or being played for 1 frame
  • Fix BackStackAlteration.kt some devices do not recompose list of bs-screens upon changing

v 1.0.2

12 Mar 11:15
Compare
Choose a tag to compare

General

  • Add freeArgs as additional nav param (useful to deeplinks & metadata + some rare cases) #8 #10
  • minor internal improve in NavDestinationScope<*>.* ext's (navArgs, navResult..), direct access to data instead of using Map
  • improve internal data storage
  • Set minSDK 21 for Android
  • Update compose up to 1.6.0
  • Introduce Koin + TiamatViewModel integration
    • tiamatViewModel & tiamatViewModelOf functiond to defined inside module
    • Composable koinTiamatViewModel function to get instance
    • example KoinIntegration.kt

Examples

  • Add deeplink example
  • Update tabs example (in-tab nested navigation)
  • ViewModels add coroutine usage example

Fixes

  • fix recomposition not happen if same destinations follow ont by one in the backstack
  • root nav controller now release all resources upond destruction (leaving composition)
  • fix android lifecycle initial state where updated within small delay
  • fix iOS unable to generate autokey for models

Changes

  • renamed StorageMode.DataStore.ResetOnDataLoss -> StorageMode.ResetOnDataLoss
  • renamed StorageMode.DataStore.IgnoreDataLoss -> StorageMode.IgnoreDataLoss
  • rememberNavController key: Any? = null -> key: String? = null (key is now string, we need stable class to be used here)

v 1.0.1

05 Mar 00:20
5fd8db0
Compare
Choose a tag to compare

Initial release