mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-17 03:09:00 +00:00
fix minor bugs
This commit is contained in:
parent
c0f62c4d66
commit
e390abc3bb
3 changed files with 7 additions and 3 deletions
|
|
@ -2,7 +2,7 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.habitrpg.android.habitica"
|
||||
android:versionCode="1903"
|
||||
android:versionCode="1904"
|
||||
android:versionName="1.1"
|
||||
android:screenOrientation="portrait"
|
||||
android:installLocation="auto" >
|
||||
|
|
|
|||
|
|
@ -28,7 +28,11 @@ abstract class RealmBaseLocalRepository implements BaseLocalRepository {
|
|||
|
||||
@Override
|
||||
public <T extends RealmObject> T getUnmanagedCopy(T object) {
|
||||
return realm.copyFromRealm(object);
|
||||
if (object.isManaged() && object.isValid()) {
|
||||
return realm.copyFromRealm(object);
|
||||
} else {
|
||||
return object;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ public class ChallengeDetailActivity extends BaseActivity {
|
|||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.menu_challenge_details, menu);
|
||||
|
||||
if(challenge != null && !challenge.leaderId.equals(userId)){
|
||||
if(challenge != null && challenge.leaderId != null && !challenge.leaderId.equals(userId)){
|
||||
menu.setGroupVisible(R.id.challenge_edit_action_group, false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue