Fix some issues

This commit is contained in:
Thomas 2020-04-24 14:44:47 +02:00
parent 5f5ed0ac95
commit dc50da59df
4 changed files with 20 additions and 16 deletions

View File

@ -179,6 +179,7 @@ public abstract class BaseMainActivity extends BaseActivity
public static String regex_home, regex_local, regex_public;
public static boolean show_boosts, show_replies, show_art_nsfw;
public static iconLauncher mLauncher = iconLauncher.BUBBLES;
public static boolean isAttached = false;
private static boolean notificationChecked = false;
private final int PICK_IMPORT = 5556;
private FloatingActionButton toot, delete_all, add_new;
@ -202,7 +203,6 @@ public abstract class BaseMainActivity extends BaseActivity
private View dialogReleaseNoteView;
private List<Account> developers;
public static boolean isAttached = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -2375,15 +2375,6 @@ public abstract class BaseMainActivity extends BaseActivity
}
}
public enum iconLauncher {
BUBBLES,
FEDIVERSE,
HERO,
ATOM,
BRAINCRASH,
MASTALAB
}
@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
@ -2396,6 +2387,15 @@ public abstract class BaseMainActivity extends BaseActivity
isAttached = false;
}
public enum iconLauncher {
BUBBLES,
FEDIVERSE,
HERO,
ATOM,
BRAINCRASH,
MASTALAB
}
/**
* Page Adapter for Mastodon & Peertube & PixelFed
*/

View File

@ -233,7 +233,8 @@ public class Account implements Parcelable {
displayNameSpan.setSpan(
imageSpan, startPosition,
endPosition, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
}catch (Exception ignored){}
} catch (Exception ignored) {
}
return;
}
}

View File

@ -899,7 +899,8 @@ public class Status implements Parcelable {
contentSpan.setSpan(
imageSpan, startPosition,
endPosition, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
}catch (Exception ignored){}
} catch (Exception ignored) {
}
}
}
}

View File

@ -1792,7 +1792,7 @@ public class Helper {
if (!accountChoice.getAvatar().startsWith("http"))
accountChoice.setAvatar("https://" + accountChoice.getInstance() + accountChoice.getAvatar());
ImageView itemIconAcc = new ImageView(activity);
if( !activity.isFinishing() && isAttached) {
if (!activity.isFinishing() && isAttached) {
try {
Glide.with(activity)
.asDrawable()
@ -1825,7 +1825,8 @@ public class Helper {
}
});
}catch (Exception ignored){}
} catch (Exception ignored) {
}
}
if (accounts.size() > 2) {
@ -1933,7 +1934,7 @@ public class Helper {
}
if (!urlHeader.contains("missing.png")) {
ImageView backgroundImage = headerLayout.findViewById(R.id.back_ground_image);
if( !activity.isFinishing() && isAttached) {
if (!activity.isFinishing() && isAttached) {
try {
Glide.with(activity)
.asDrawable()
@ -1956,7 +1957,8 @@ public class Helper {
}
});
}catch (Exception ignored){}
} catch (Exception ignored) {
}
}
}
}