Fix minor issue

This commit is contained in:
Phillip Thelen 2018-11-19 12:28:27 +01:00
parent 4b4d60e624
commit a40c5ae9dc
8 changed files with 45 additions and 10 deletions

View file

@ -146,7 +146,7 @@ android {
buildConfigField "String", "STORE", "\"google\""
multiDexEnabled true
versionCode 2030
versionCode 2035
versionName "1.6"
}

View file

@ -2,7 +2,7 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout
<RelativeLayout
android:id="@+id/chatBarContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -11,9 +11,13 @@
android:paddingRight="@dimen/spacing_medium">
<LinearLayout
android:id="@+id/chatInputContainer"
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true">
<ImageButton
android:id="@+id/emojiButton"
@ -87,10 +91,13 @@
android:layout_height="wrap_content"
android:text="@string/read_community_guidelines"
style="@style/Caption3"
android:textColor="@color/brand_300" />
android:textColor="@color/brand_300"
android:layout_above="@id/spacing"
android:layout_below="@id/chatInputContainer"/>
<Space
android:id="@+id/spacing"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
</merge>

View file

@ -47,7 +47,7 @@ public class RemoteConfigManager {
public Integer maxChatLength() { return maxChatLength; }
public Boolean enableUsernameRelease() { return true; }
public Boolean enableUsernameRelease() { return enableUsernameRelease; }
private void loadFromPreferences () {
String storedPreferences = PreferenceManager.getDefaultSharedPreferences(context)

View file

@ -0,0 +1,12 @@
package com.habitrpg.android.habitica.models.inventory.owned
import io.realm.RealmObject
import io.realm.annotations.PrimaryKey
open class OwnedEquipment : RealmObject() {
@PrimaryKey
var combinedKey: String? = ""
var userID: String? = ""
var key: String? = ""
}

View file

@ -26,6 +26,7 @@ public class Flags extends RealmObject {
private boolean armoireEmpty;
private boolean communityGuidelinesAccepted;
private boolean verifiedUsername;
private boolean warnedLowHealth;
public List<TutorialStep> getTutorial() {
return tutorial;
@ -138,4 +139,12 @@ public class Flags extends RealmObject {
public void setVerifiedUsername(boolean verifiedUsername) {
this.verifiedUsername = verifiedUsername;
}
public boolean isWarnedLowHealth() {
return warnedLowHealth;
}
public void setWarnedLowHealth(boolean warnedLowHealth) {
this.warnedLowHealth = warnedLowHealth;
}
}

View file

@ -128,7 +128,7 @@ class InboxMessageListFragment : BaseMainFragment(), androidx.swiperefreshlayout
.delay(200, TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(Consumer {
recyclerView.scrollToPosition(0)
recyclerView?.scrollToPosition(0)
}, RxErrorHandler.handleEmptyError())
KeyboardUtil.dismissKeyboard(getActivity())
}

View file

@ -133,7 +133,7 @@ class ChatBarView : FrameLayout {
navBarAccountedHeightCalculated = true
val navbarHeight = NavbarUtils.getNavbarHeight(context)
spacing.updateLayoutParams<LinearLayout.LayoutParams> {
spacing.updateLayoutParams<RelativeLayout.LayoutParams> {
height = navbarHeight
}
}

View file

@ -88,10 +88,17 @@ public class MemberSerialization implements JsonDeserializer<Member> {
if (obj.has("loginIncentives")) {
member.setLoginIncentives(obj.get("loginIncentives").getAsInt());
}
/*
TODO: Fix ownership storage
Right now ownership is a boolean field on the item/pet/mount/equipment itself.
Storing this data for the user can overwrite the ownership for the logged in user. The fix
is to properly store ownership of these things in a different object, similar to how the
iOS app handles it.
if (obj.has("items")) {
member.setItems(context.deserialize(obj.get("items"), Items.class));
}
*/
member.setId(member.getId());
realm.close();