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\"" buildConfigField "String", "STORE", "\"google\""
multiDexEnabled true multiDexEnabled true
versionCode 2030 versionCode 2035
versionName "1.6" versionName "1.6"
} }

View file

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

View file

@ -47,7 +47,7 @@ public class RemoteConfigManager {
public Integer maxChatLength() { return maxChatLength; } public Integer maxChatLength() { return maxChatLength; }
public Boolean enableUsernameRelease() { return true; } public Boolean enableUsernameRelease() { return enableUsernameRelease; }
private void loadFromPreferences () { private void loadFromPreferences () {
String storedPreferences = PreferenceManager.getDefaultSharedPreferences(context) 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 armoireEmpty;
private boolean communityGuidelinesAccepted; private boolean communityGuidelinesAccepted;
private boolean verifiedUsername; private boolean verifiedUsername;
private boolean warnedLowHealth;
public List<TutorialStep> getTutorial() { public List<TutorialStep> getTutorial() {
return tutorial; return tutorial;
@ -138,4 +139,12 @@ public class Flags extends RealmObject {
public void setVerifiedUsername(boolean verifiedUsername) { public void setVerifiedUsername(boolean verifiedUsername) {
this.verifiedUsername = 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) .delay(200, TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(Consumer { .subscribe(Consumer {
recyclerView.scrollToPosition(0) recyclerView?.scrollToPosition(0)
}, RxErrorHandler.handleEmptyError()) }, RxErrorHandler.handleEmptyError())
KeyboardUtil.dismissKeyboard(getActivity()) KeyboardUtil.dismissKeyboard(getActivity())
} }

View file

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

View file

@ -88,10 +88,17 @@ public class MemberSerialization implements JsonDeserializer<Member> {
if (obj.has("loginIncentives")) { if (obj.has("loginIncentives")) {
member.setLoginIncentives(obj.get("loginIncentives").getAsInt()); 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")) { if (obj.has("items")) {
member.setItems(context.deserialize(obj.get("items"), Items.class)); member.setItems(context.deserialize(obj.get("items"), Items.class));
} }
*/
member.setId(member.getId()); member.setId(member.getId());
realm.close(); realm.close();