fossasia / open-event-droidgen

Open Event Android App Generator https://github.com/fossasia/open-event-android/raw/apk/sample-apk-fossasia17-development.apk
GNU General Public License v3.0
2.06k stars 828 forks source link

fix: Fix implementation of LiveData in SpeakerDetailActivity. #2381

Closed ParthivMangukiya closed 6 years ago

ParthivMangukiya commented 6 years ago

Fixes #2380

Changes: Added getSpeakerAsRealmResults method which return Speaker as RealmResult Instead of Realm Objects.

ParthivMangukiya commented 6 years ago

@iamareebjamal Please Review. I found that changeListener of RealmObject does not call if any object of spawnList is modify. so I've added getSpeaker method in realmRepository which return speaker as RealmResult than took the first element on Transformation.map method.

getSpeaker() method which returns Speaker is no longer used should i remove it?

iamareebjamal commented 6 years ago

Please rename the method to getSpeakersForName

ParthivMangukiya commented 6 years ago

@iamareebjamal Should I change method name of getSpeakerAsRealmResults or getSpeaker of SpeakerDetailViewModel or both?

Should I remove old getSpeaker() method of RealmDataRepository which returns Speaker not RealmResults?

iamareebjamal commented 6 years ago

Of getSpeakerAsRealmResults

And no, don't delete that method for now

ParthivMangukiya commented 6 years ago

@iamareebjamal done, Please Review.

iamareebjamal commented 6 years ago

Please ensure that #2363 is not occurring because the code removed was fixing that

ParthivMangukiya commented 6 years ago

@iamareebjamal yes i am aware of that issue. I'd tested it. here is the screenshot for the same. 20180318_205332