diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java index 256591611..a392e4c80 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java @@ -219,7 +219,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList if(!isOwnProfile) loadRelationship(); else if (isInstanceAkkoma()) { - maxFields = getInstance().get().pleroma.metadata.fieldsLimits.maxFields; + maxFields = (int) getInstance().get().pleroma.metadata.fieldsLimits.maxFields; } }else{ profileAccountID=getArguments().getString("profileAccountID"); diff --git a/mastodon/src/main/java/org/joinmastodon/android/model/Instance.java b/mastodon/src/main/java/org/joinmastodon/android/model/Instance.java index aacf41b9a..ed91e59cf 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/model/Instance.java +++ b/mastodon/src/main/java/org/joinmastodon/android/model/Instance.java @@ -245,19 +245,19 @@ public class Instance extends BaseModel{ @Parcel public static class FieldsLimits { - public int maxFields; - public int maxRemoteFields; - public int nameLength; - public int valueLength; + public long maxFields; + public long maxRemoteFields; + public long nameLength; + public long valueLength; } } } @Parcel public static class PleromaPollLimits { - public int maxExpiration; - public int maxOptionChars; - public int maxOptions; - public int minExpiration; + public long maxExpiration; + public long maxOptionChars; + public long maxOptions; + public long minExpiration; } } diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/viewcontrollers/ComposePollViewController.java b/mastodon/src/main/java/org/joinmastodon/android/ui/viewcontrollers/ComposePollViewController.java index 9c3b64e7f..d4415b538 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/viewcontrollers/ComposePollViewController.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/viewcontrollers/ComposePollViewController.java @@ -82,9 +82,9 @@ public class ComposePollViewController{ maxPollOptionLength=instance.configuration.polls.maxCharactersPerOption; } else { if(instance!=null && instance.pollLimits!=null && instance.pollLimits.maxOptions>0) - maxPollOptions=instance.pollLimits.maxOptions; + maxPollOptions= (int) instance.pollLimits.maxOptions; if(instance!=null && instance.pollLimits!=null && instance.pollLimits.maxOptionChars>0) - maxPollOptionLength=instance.pollLimits.maxOptionChars; + maxPollOptionLength= (int) instance.pollLimits.maxOptionChars; } pollOptionsView=pollWrap.findViewById(R.id.poll_options);