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)
|
if(!isOwnProfile)
|
||||||
loadRelationship();
|
loadRelationship();
|
||||||
else if (isInstanceAkkoma()) {
|
else if (isInstanceAkkoma()) {
|
||||||
maxFields = getInstance().get().pleroma.metadata.fieldsLimits.maxFields;
|
maxFields = (int) getInstance().get().pleroma.metadata.fieldsLimits.maxFields;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
profileAccountID=getArguments().getString("profileAccountID");
|
profileAccountID=getArguments().getString("profileAccountID");
|
||||||
|
|
|
@ -245,19 +245,19 @@ public class Instance extends BaseModel{
|
||||||
|
|
||||||
@Parcel
|
@Parcel
|
||||||
public static class FieldsLimits {
|
public static class FieldsLimits {
|
||||||
public int maxFields;
|
public long maxFields;
|
||||||
public int maxRemoteFields;
|
public long maxRemoteFields;
|
||||||
public int nameLength;
|
public long nameLength;
|
||||||
public int valueLength;
|
public long valueLength;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Parcel
|
@Parcel
|
||||||
public static class PleromaPollLimits {
|
public static class PleromaPollLimits {
|
||||||
public int maxExpiration;
|
public long maxExpiration;
|
||||||
public int maxOptionChars;
|
public long maxOptionChars;
|
||||||
public int maxOptions;
|
public long maxOptions;
|
||||||
public int minExpiration;
|
public long minExpiration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,9 +82,9 @@ public class ComposePollViewController{
|
||||||
maxPollOptionLength=instance.configuration.polls.maxCharactersPerOption;
|
maxPollOptionLength=instance.configuration.polls.maxCharactersPerOption;
|
||||||
} else {
|
} else {
|
||||||
if(instance!=null && instance.pollLimits!=null && instance.pollLimits.maxOptions>0)
|
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)
|
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);
|
pollOptionsView=pollWrap.findViewById(R.id.poll_options);
|
||||||
|
|
Loading…
Reference in New Issue