Giter Club home page Giter Club logo

wak-plus's People

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

Watchers

 avatar  avatar

wak-plus's Issues

BottomNavigationView의 탭을 눌러도 선택되지 않는 문제

버그 내용

  • BottomNavigationView에 3개의 탭인 홈, 즐겨찾기, 설정이 존재
  • 설정 화면의 버튼을 통해 다크 모드 설정 또는 테마 설정 화면으로 이동 가능
    • 설정 : SettingsFragment
    • 다크 모드 설정 : DarkModeFragment
    • 테마 설정 : ThemeFragment
  • 예시) 테마 설정 화면이 띄워진 상태에서 설정 탭 이외의 다른 탭인 홈 탭을 눌렀더가 다시 설정 탭을 누를 경우, 화면은 이전에 띄워놓았던 테마 설정 화면으로 돌아가지만 탭은 설정 탭이 아니라 홈 탭이 여전히 선택되어 있다.

참고 링크

네트워크 연결 상태 버그 수정

문제

백그라운드 상태의 앱을 다시 실행했을 때 낮은 빈도로 네트워크에 연결이 되어 있는데도 네트워크 연결 되지 않음 UI가 나타나는 버그

프로필 이미지 변경 시 즐겨찾기에 저장된 이미지 url 변경

버그 설명

스트리머가 트위치의 프로필 이미지 변경 시, 과거 즐겨찾기에 저장했던 Content의 profile url은 만료되어 표시되지 않는 문제가 발생

생각 중인 해결 방법

  1. coil의 target을 사용하여 만료된 profile url의 403 Error 처리하기
  2. API를 통해 불러온 profile url을 cache하여 즐겨찾기 화면에서 사용하기

CoroutineDispatcher를 Hilt를 통해 주입

문제

Android의 코루틴 권장사항 문서를 보면 Don't hardcode Dispatchers when creating new coroutines 라는 내용이 제일 먼저 등장한다.

// DO NOT hardcode Dispatchers
class NewsRepository {
    // DO NOT use Dispatchers.Default directly, inject it instead
    suspend fun loadNews() = withContext(Dispatchers.Default) { /* ... */ }
}

Dispatchers를 하드코딩 하지 말고 주입하라는 이야기인데 기존 코드는 application 범위의 CoroutineScope 를 Hilt를 통해서 생성하고 있긴 했지만 Dispatchers는 직접 코드에 작성하고 있었으므로 CoroutinesDispatchersModule 을 통해서 Dispatchers를 주입할 수 있도록 코드를 수정할 것이다.

이 리팩토링은 구글의 안드로이드 개발자 Manuel Vivo의 글 Create an application CoroutineScope using Hilt를 기반으로 진행할 예정이다.

Firestore DB로부터 데이터 얻어오기

문제

Youtube 또는 Twitch API로부터 직접 데이터를 불러올 경우 할당량 제한 문제가 있으므로 Firebase의 Cloud Firestore를 이용하여 캐싱한 데이터를 불러오는 방법으로 할당량 문제를 해결

Jetpack DataStore를 이용하여 Access Token 저장하기

  • local.properties에 저장한 API key들을 BuildConfig를 통해 접근할 수 있도록 처리
  • Preferences DataStore를 이용하여 Twitch의 Access Token 저장
  • Hilt 모듈 내에서 Preferences DataStore의 데이터를 읽어오기
  • Access Token을 발급받지 않았거나, 기한이 만료되었을때 재발급 받는 코드 추가

DB에 저장될 객체의 동등성 비교 문제

@Entity(tableName = "twitch_table")
data class TwitchVideoEntity(
    @PrimaryKey val twitchUserInfo: TwitchUserInfo,  // 문제의 부분
    @ColumnInfo val twitchVideoInfo: TwitchVideoInfo,
    val isFavorite: Boolean,
) : ContentData()

@PrimaryKeyTwitchUserInfo를 설정하는 바람에 동일한 TwitchUser의 다른 Video(Content)들을 저장하여도 하나의 Video만 저장되는 문제가 발생.

각 Video의 고유한 값이 될 수 있는 TwitchVideoInfo@PrimaryKey 어노테이션을 붙여 간단히 해결.

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.