Remove scrollable preview & Reduce max accounts to 3
This commit is contained in:
@@ -143,24 +143,9 @@ ConnectionsManager& ConnectionsManager::getInstance(int32_t instanceNum) {
|
||||
static ConnectionsManager instance1(1);
|
||||
return instance1;
|
||||
case 2:
|
||||
default:
|
||||
static ConnectionsManager instance2(2);
|
||||
return instance2;
|
||||
case 3:
|
||||
static ConnectionsManager instance3(3);
|
||||
return instance3;
|
||||
case 4:
|
||||
static ConnectionsManager instance4(4);
|
||||
return instance4;
|
||||
case 5:
|
||||
static ConnectionsManager instance5(5);
|
||||
return instance5;
|
||||
case 6:
|
||||
static ConnectionsManager instance6(6);
|
||||
return instance6;
|
||||
case 7:
|
||||
default:
|
||||
static ConnectionsManager instance7(7);
|
||||
return instance7;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#define DOWNLOAD_CONNECTIONS_COUNT 2
|
||||
#define UPLOAD_CONNECTIONS_COUNT 4
|
||||
#define CONNECTION_BACKGROUND_KEEP_TIME 10000
|
||||
#define MAX_ACCOUNT_COUNT 8
|
||||
#define MAX_ACCOUNT_COUNT 3
|
||||
#define USE_DELEGATE_HOST_RESOLVE
|
||||
|
||||
#define USE_IPV4_ONLY 0
|
||||
|
||||
@@ -16,8 +16,6 @@ public class ExteraConfig {
|
||||
private static final int[] OFFICIAL_CHANNELS = {1233768168, 1524581881, 1571726392, 1632728092, 1638754701, 1779596027, 1172503281};
|
||||
private static final int[] DEVS = {963080346, 1282540315, 1374434073, 388099852, 1999113390, 1566664501};
|
||||
|
||||
public static boolean scrollablePreview;
|
||||
|
||||
public static boolean useSystemFonts;
|
||||
public static boolean disableVibration;
|
||||
public static boolean blurForAllThemes;
|
||||
@@ -81,8 +79,6 @@ public class ExteraConfig {
|
||||
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("exteraconfig", Activity.MODE_PRIVATE);
|
||||
|
||||
scrollablePreview = preferences.getBoolean("scrollablePreview", true);
|
||||
|
||||
useSystemFonts = preferences.getBoolean("useSystemFonts", true);
|
||||
disableVibration = preferences.getBoolean("disableVibration", false);
|
||||
blurForAllThemes = preferences.getBoolean("blurForAllThemes", true);
|
||||
|
||||
@@ -82,8 +82,7 @@ public class ActionBarLayout extends FrameLayout {
|
||||
private int backgroundColor;
|
||||
|
||||
public LayoutContainer(Context context) {
|
||||
super(context);
|
||||
setClickable(true);
|
||||
super(context);
|
||||
setWillNotDraw(false);
|
||||
}
|
||||
|
||||
@@ -189,34 +188,12 @@ public class ActionBarLayout extends FrameLayout {
|
||||
|
||||
@Override
|
||||
public boolean dispatchTouchEvent(MotionEvent ev) {
|
||||
boolean previewModeStatus = !ExteraConfig.scrollablePreview && inPreviewMode;
|
||||
boolean passivePreview = previewModeStatus && previewMenu == null;
|
||||
boolean passivePreview = inPreviewMode && previewMenu == null;
|
||||
|
||||
if ((passivePreview || transitionAnimationPreviewMode) && (ev.getActionMasked() == MotionEvent.ACTION_DOWN || ev.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!ExteraConfig.scrollablePreview && inPreviewMode && previewMenu == null) {
|
||||
View view = containerView.getChildAt(0);
|
||||
if (view != null) {
|
||||
int y = (int) (view.getTop() + containerView.getTranslationY());
|
||||
y += AndroidUtilities.dp(24);
|
||||
if (ev.getY() <= y && ev.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
movePreviewFragment(AndroidUtilities.dp(65));
|
||||
}
|
||||
boolean isValidTouch = ev.getX() >= AndroidUtilities.dp(8);
|
||||
isValidTouch &= ev.getX() <= view.getRight() - AndroidUtilities.dp(8);
|
||||
isValidTouch &= ev.getY() <= view.getBottom();
|
||||
isValidTouch &= ev.getY() >= y + AndroidUtilities.dp(70);
|
||||
if (!isValidTouch) {
|
||||
if (ev.getY() > view.getBottom() && ev.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
finishPreviewFragment();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
try {
|
||||
return (!passivePreview || this != containerView) && super.dispatchTouchEvent(ev);
|
||||
} catch (Throwable e) {
|
||||
|
||||
Reference in New Issue
Block a user