View rxStore.java
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
public class BaseModel<R, T> implements Serializable { | |
public T payload; | |
public HashMap<Integer, BaseModel<R, T>> partialPayload = new HashMap<>(); | |
public long lastUpdated; | |
public ResultCode resultCode; | |
} | |
public interface Github { | |
@GET("/users/{userName}/repos") |
View okiobuffer.java
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
public void readTwice() | |
{ | |
Observable.fromCallable(() -> { | |
RedditData inflatedModel = null; | |
Response response = makeRequest(); | |
String diskValue = null; | |
try { | |
File file = new File(getContext().getCacheDir(), "file"); | |
BufferedSink cacheBody = Okio.buffer(Okio.sink(file)); |
View KaikenScreen.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
fun app(){ | |
createScreen { component, navigator-> | |
val presenter = component.loginPresenter() | |
loginScreen(presenter.viewState, | |
presenter.onSubmit, | |
presenter.onForgotPassword()) | |
} | |
} | |
View MoDagggerMoProblems.java
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
public class ToDoApplication extends Application implements HasActivityInjector { | |
@Inject | |
DispatchingAndroidInjector<Activity> activityInjector; | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
DaggerAppComponent.builder().application(this).build().inject(this); | |
} |
View HiltUserComponent.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
@DefineComponent(parent = ApplicationComponent::class) | |
internal interface UserComponent | |
@DefineComponent.Builder | |
internal interface UserComponentBuilder { | |
fun withUserId(@BindsInstance userId: Int): UserComponentBuilder | |
fun build(): UserComponent | |
} | |
@DefineComponent(parent = UserComponent::class) |
View MvrxRenderer.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
MyMvrxViewModel<State, Rendering>(services:Services, userId:String, loadingVM: LoadingViewModel, dataVM:DataViewModel){ | |
sealed class State{ | |
object Loading():State | |
data class Data(value:String) | |
} | |
override fun render(context:RenderScope, state:State):{ |
View Foo.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
interface Foo{ | |
fun doStuff() | |
companion object | |
} | |
fun Foo.Companion.CreateFoo():Foo = RealFoo() | |
private class RealFoo : Foo{ |
View Foo.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
interface Foo{ | |
fun doStuff() | |
companion object | |
} | |
fun Foo.Companion.CreateFoo():Foo = RealFoo() | |
private class RealFoo : Foo{ |
View CreatStore.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
Store<Article, Integer> store = StoreBuilder.<Integer, BufferedSource, Article>parsedWithKey() | |
.fetcher(articleId -> api.getArticles(articleId)) | |
.persister(FileSystemPersister.create(FileSystemFactory.create(context.getFilesDir()), pathResolver)) | |
.parser(GsonParserFactory.createSourceParser(gson, String.class)) | |
.open(); |
View PersisterBrain.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
class State{ | |
} |
NewerOlder