Coder Social home page Coder Social logo

fayaz07 / hackernews Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 2.0 9.33 MB

Android app built with modern android architecture components, consuming HackerNews API

Home Page: https://hacker-news.firebaseio.com/v0/

License: MIT License

Kotlin 100.00%
toml-config splash-screen-android viewbinding viewmodel livedata navigation-architecture-component fragments dagger2 hilt dependency

hackernews's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hackernews's Issues

store ids by type in local database

  • store ids for show and other types in local database, a new table
  • for every id add timestamp (set timestamp value to when we fetched the data from internet)
  • while fetching ids, fetch from local database and merge both of them
  • if id already exists in local database, don't replace it with new one

app crash

   Process: com.mohammadfayaz.news, PID: 6965
    java.lang.IllegalArgumentException: fromIndex(34) > toIndex(33)
        at java.util.ArrayList.subListRangeCheck(ArrayList.java:1018)
        at java.util.ArrayList.subList(ArrayList.java:1008)
        at com.mohammadfayaz.hn.domain.paging.StoryPagingSource$load$2.invokeSuspend(StoryPagingSource.kt:40)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

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.