Giter Site home page Giter Site logo

Comments (4)

SsongSik avatar SsongSik commented on August 11, 2024 1

네네! 기능별로 ViewModel을 나누어서 프래그먼트별로 변경하는 것도 좋을 것 같습니다! 이대로 핫픽스 나가겠습니다!

from android.

KwakEuiJin avatar KwakEuiJin commented on August 11, 2024

재현 경로: 오늘의 학식 화면에서 교직원, 생활관, 학관 식당 중 아무거나 클릭 후 명진당 진입시 크래시 발생
크래시 종류: [java.lang.IndexOutOfBoundsException]

원인 찾았습니다. 현재 HomeFragment에서 LiveData를 구독할 때 LiveData는 이전 데이터 값을 가지고 있습니다
(activity의 뷰모델이기 때문에 activity가 죽지 않는 이상 데이터는 계속 살아있습니다.)
-> 즉 현재 Flow가 교직원, 생활관, 학관의 경우 중식, 석식 2가지에 대한 총 10개의 리스트를 가지고 있지만, 명진당의 경우 15개를 가지고 있어야 하기 때문에 남아있던 라이브데이터(10)의 리스트를 리사이클러뷰를 렌더링 하는 과정에서 에러가 났습니다.

이 부분 현재는 if문으로 분기처리하지만 fragment의 ViewModel로 변경하거나 Nullable 처리를 통해서 해결하는 방안을 구상하는 것이 좋을 것 같습니다.

from android.

KwakEuiJin avatar KwakEuiJin commented on August 11, 2024

성식님 main에 바로 푸시해도 괜찮을까요? 일단은 if문 하나로 처리가 가능해서요!
핫픽스 배포 빠르게 부탁드립니다~!!
다음 릴리즈에 리팩터링 진행해서 나가면 될 것 같습니다.

from android.

KwakEuiJin avatar KwakEuiJin commented on August 11, 2024

main에 푸시 완료했습니다. 이 문제를 근본적으로 해결하기 위해서는 ViewHolder 및 LiveData의 구독 방식의 변경이 필요할 것으로 보입니다.

from android.

Related Issues (20)

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.