Fix quest display issues. Fixes #1043

This commit is contained in:
Phillip Thelen 2018-09-20 12:51:56 +02:00
parent e0e96a5ae2
commit 2e9c849d3f
2 changed files with 12 additions and 4 deletions

View file

@ -10,6 +10,12 @@ open class QuestContent : RealmObject(), Item {
@PrimaryKey @PrimaryKey
internal var key: String = "" internal var key: String = ""
set(value) {
field = value
drop?.key = value
colors?.key = value
boss?.key = value
}
internal var text: String = "" internal var text: String = ""
var notes: String = "" var notes: String = ""
internal var value: Int = 0 internal var value: Int = 0
@ -73,8 +79,8 @@ open class QuestContent : RealmObject(), Item {
this.text = text this.text = text
} }
fun setValue(value: Int?) { fun setValue(value: Int) {
this.value = value!! this.value = value
} }
fun setKey(key: String) { fun setKey(key: String) {

View file

@ -179,11 +179,13 @@ class QuestDetailFragment : BaseMainFragment() {
} }
} }
} }
questParticipantList?.addView(participantView)
} else { } else {
statusTextView?.visibility = View.GONE statusTextView?.visibility = View.GONE
if (participant.participatesInQuest == true) {
questParticipantList?.addView(participantView)
}
} }
questParticipantList?.addView(participantView)
if (quest?.active == true || participant.participatesInQuest == true) { if (quest?.active == true || participant.participatesInQuest == true) {
participantCount += 1 participantCount += 1
} }