codesyle cringe

This commit is contained in:
gdlbo
2022-07-11 21:14:02 +03:00
parent 5bd52c23ae
commit 4d719e4308
87 changed files with 825 additions and 833 deletions
@@ -42,9 +42,9 @@ public class TelegramStickersPack extends CustomStickersPack{
public JSONObject encodeEmojis() throws JSONException{
JSONObject obj = new JSONObject();
for(HashMap.Entry<String, List<Integer>> en : emojis.entrySet()) {
for (HashMap.Entry<String, List<Integer>> en : emojis.entrySet()) {
JSONArray arr = new JSONArray();
for(int i : en.getValue()) arr.put(i);
for (int i : en.getValue()) arr.put(i);
obj.put(en.getKey(), arr);
}
@@ -57,16 +57,16 @@ public class TelegramStickersPack extends CustomStickersPack{
String key = it.next();
//emojis.put(key, obj.getInt(key));
List<Integer> list = emojis.get(key);
if(list == null) list = new ArrayList<>();
if (list == null) list = new ArrayList<>();
JSONArray arr = obj.getJSONArray(key);
for(int i = 0; i < arr.length(); i++)
for (int i = 0; i < arr.length(); i++)
list.add(arr.getInt(i));
emojis.put(key, list);
}
}
public Bitmap getIcon(int targetMaxSideSize){
if(state != DOWNLOADED && state != UPDATING)
if (state != DOWNLOADED && state != UPDATING)
throw new IllegalStateException("Unable to get an icon of a pack that hasn't been downloaded yet");
File icon = new File(folder, "001.png");
@@ -85,7 +85,7 @@ public class TelegramStickersPack extends CustomStickersPack{
int maxSideSize = op.outWidth > op.outHeight ? op.outWidth : op.outHeight;
if(maxSideSize > targetMaxSideSize){
if (maxSideSize > targetMaxSideSize) {
op.inScaled = true;
op.inDensity = maxSideSize;
op.inTargetDensity = targetMaxSideSize;