fix(#307): use longs instead of ints in Pleroma/Akkoma instance poll configs
Who the hell had the idea to use longs for this >:C
This commit is contained in:
parent
d8cc578537
commit
e0ff1f6725
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue