Giter VIP home page Giter VIP logo

android-fore's People

Contributors

dependabot[bot] avatar erdo avatar justin-blue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

arirang372 gmk57

android-fore's Issues

adding and removing observers from non UI threads should still work flawlessly

Currently in fore, adding and removing observers always happens on the UI thread (because that's where the lifecycle methods like onPause run). That's also the case when using fore's observeAsState() extension function with Compose, however there is the possibility that future versions of compose will run composables from non-UI threads

From this blog post https://jorgecastillo.dev/jetpack-compose-effect-handlers

In the future, compositions could be potentially offloaded to different threads, executed in parallel, in different order, or similar things. That’s a door for diverse potential optimizations the Compose team wants to keep open

I think it's debatable the thread thing will actually happen (there's a reason most UI platforms don't do that), but if it does happen we need to make sure that adding and removing observers still works flawlessly and still remains testable (so in fore that means taking in to account the WorkMode)

SyncTrigger - make the trigger reset immediately after firing

At the moment the trigger is only reset if a subsequent call to checkThreshold() returns false.

Sometimes it's convenient to just have the trigger immediately reset, without having to wait for a subsequent call to checkThreshold() that returns false.

We should be able to configure SyncTrigger to operate in either mode

apollo integration

similar to the retrofit integration, so maybe a new package :fore-apollo-kt

have a think about what to do for fore-kt (do we want to move the dependency on retrofit out of there?) so something like in a client app:

implementation("co.early.fore:fore-kt:1.2.1")
implementation("com.squareup.retrofit2:retrofit:a.b.c")

and

implementation("co.early.fore:fore-kt:1.2.1")
implementation("com.apollographql.apollo:apollo-runtime:a.b.c")

ProGuard error with fore 1.2.1 (the kotlin packages only)

Symptom

ProGuard error when building release version or during obfuscation:

Warning unexpectedly contains class
Warning there were classes in incorrectly named files
You should make sure all file names correspond to their class names
The directory hierarchies must correspond to the package hierarchies

Cause

fore 1.2.1 upgrades kotlin to 1.4 (and also references io.arrow-kt:arrow-core-data:0.10.5, which also upgraded to kotlin 1.4), if your project has not upgraded to kotlin 1.4 yet, you might encounter this when building releases

Work around

You can use 1.2.1-legacy-KOTLIN-1.3.x from the legacy branch which is the same as 1.2.1 but built with kotlin 1.3.72 (...put an actual x, don't replace the x with 72! see jcenter)

implementation("co.early.fore:fore-kt:1.2.1-legacy-KOTLIN-1.3.x")
implementation("co.early.fore:fore-core-kt:1.2.1-legacy-KOTLIN-1.3.x")
implementation("co.early.fore:fore-adapters-kt:1.2.1-legacy-KOTLIN-1.3.x")
implementation("co.early.fore:fore-retrofit-kt:1.2.1-legacy-KOTLIN-1.3.x")

tabbed kotlin/java code examples in markdown docs

Work out how can we add tabbed kotlin/java code examples in markdown docs so that it's easy to see examples in either kotlin or java according to preference. Will need to survive the transformation from mark down file to html that jekyll does for github pages.

update kotlin examples to use lifecycleobserver

The current kotlin examples do everything the long way so that it's super clear what's going on (adding / removing observers in onResume / onPause for example) - I think it's probably time to use the lifecycle observers to remove this boiler plate - over the years the observer pattern has become much more familiar to the average android developer, so I think we don't really need to be so careful to explain all the details in the sample apps. The style used in the external samples might be more appropriate (see https://github.com/erdo/persista/blob/main/example-app/src/main/java/foo/bar/example/ui/wallet/WalletsActivity.kt )

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.