mirror of https://github.com/NekoX-Dev/NekoX.git
Fix noGcm crash
This commit is contained in:
parent
014acf64dc
commit
257a87da08
|
@ -128,9 +128,6 @@ import org.telegram.ui.Cells.UserCell;
|
|||
import org.telegram.ui.Components.AlertsCreator;
|
||||
import org.telegram.ui.Components.AnimatedArrowDrawable;
|
||||
import org.telegram.ui.Components.AnimationProperties;
|
||||
import org.telegram.ui.Components.FilterTabsView;
|
||||
import org.telegram.ui.Components.FiltersListBottomSheet;
|
||||
import org.telegram.ui.Components.PullForegroundDrawable;
|
||||
import org.telegram.ui.Components.AvatarDrawable;
|
||||
import org.telegram.ui.Components.BackupImageView;
|
||||
import org.telegram.ui.Components.ChatActivityEnterView;
|
||||
|
@ -139,6 +136,7 @@ import org.telegram.ui.Components.CubicBezierInterpolator;
|
|||
import org.telegram.ui.Components.DialogsItemAnimator;
|
||||
import org.telegram.ui.Components.EmptyTextProgressView;
|
||||
import org.telegram.ui.Components.FilterTabsView;
|
||||
import org.telegram.ui.Components.FiltersListBottomSheet;
|
||||
import org.telegram.ui.Components.FragmentContextView;
|
||||
import org.telegram.ui.Components.JoinGroupAlert;
|
||||
import org.telegram.ui.Components.LayoutHelper;
|
||||
|
@ -1550,16 +1548,16 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
|||
AndroidUtilities.runOnUIThread(() -> Theme.createChatResources(context, false));
|
||||
|
||||
ActionBarMenu menu = actionBar.createMenu();
|
||||
doneItem = new ActionBarMenuItem(context, null, Theme.getColor(Theme.key_actionBarDefaultSelector), Theme.getColor(Theme.key_actionBarDefaultIcon), true);
|
||||
doneItem.setText(LocaleController.getString("Done", R.string.Done).toUpperCase());
|
||||
actionBar.addView(doneItem, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.RIGHT, 0, 0, 10, 0));
|
||||
doneItem.setOnClickListener(v -> {
|
||||
filterTabsView.setIsEditing(false);
|
||||
showDoneItem(false);
|
||||
});
|
||||
doneItem.setAlpha(0.0f);
|
||||
doneItem.setVisibility(View.GONE);
|
||||
if (!onlySelect && searchString == null && folderId == 0) {
|
||||
doneItem = new ActionBarMenuItem(context, null, Theme.getColor(Theme.key_actionBarDefaultSelector), Theme.getColor(Theme.key_actionBarDefaultIcon), true);
|
||||
doneItem.setText(LocaleController.getString("Done", R.string.Done).toUpperCase());
|
||||
actionBar.addView(doneItem, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.RIGHT, 0, 0, 10, 0));
|
||||
doneItem.setOnClickListener(v -> {
|
||||
filterTabsView.setIsEditing(false);
|
||||
showDoneItem(false);
|
||||
});
|
||||
doneItem.setAlpha(0.0f);
|
||||
doneItem.setVisibility(View.GONE);
|
||||
proxyDrawable = new ProxyDrawable(context);
|
||||
proxyItem = menu.addItem(2, proxyDrawable);
|
||||
proxyItem.setContentDescription(LocaleController.getString("ProxySettings", R.string.ProxySettings));
|
||||
|
@ -1689,7 +1687,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
|||
scrollToTop();
|
||||
});
|
||||
|
||||
if (initialDialogsType == 0 && folderId == 0 && !onlySelect && TextUtils.isEmpty(searchString)) {
|
||||
if ((initialDialogsType == 3 && NekoConfig.showTabsOnForward) || initialDialogsType == 0 && folderId == 0 && !onlySelect && TextUtils.isEmpty(searchString)) {
|
||||
scrimPaint = new Paint() {
|
||||
@Override
|
||||
public void setAlpha(int a) {
|
||||
|
|
|
@ -113,7 +113,6 @@ import org.telegram.ui.Components.SlideView;
|
|||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.math.BigInteger;
|
||||
import java.security.PublicKey;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
|
@ -551,11 +550,11 @@ public class LoginActivity extends BaseFragment implements NotificationCenter.No
|
|||
|
||||
int dcType;
|
||||
|
||||
if (MessagesController.getMainSettings(currentAccount).getBoolean("custom_dc", false)) {
|
||||
dcType = 2;
|
||||
} else if (ConnectionsManager.native_isTestBackend(currentAccount) != 0) {
|
||||
if (ConnectionsManager.native_isTestBackend(currentAccount) != 0) {
|
||||
dcType = 1;
|
||||
} else {
|
||||
} else if (MessagesController.getMainSettings(currentAccount).getBoolean("custom_dc", false)) {
|
||||
dcType = 2;
|
||||
} else {
|
||||
dcType = 0;
|
||||
}
|
||||
|
||||
|
@ -794,7 +793,6 @@ public class LoginActivity extends BaseFragment implements NotificationCenter.No
|
|||
|
||||
}
|
||||
|
||||
|
||||
builder.addCancelButton();
|
||||
|
||||
builder.addButton(LocaleController.getString("Set", R.string.Set), (it) -> {
|
||||
|
|
|
@ -77,7 +77,7 @@ public class ExternalGcm {
|
|||
FileLog.d("No valid Google Play Services APK found.");
|
||||
}
|
||||
SharedConfig.pushStringStatus = "__NO_GOOGLE_PLAY_SERVICES__";
|
||||
GcmPushListenerService.sendRegistrationToServer(null);
|
||||
ConnectionsManager.setRegId(null, SharedConfig.pushStringStatus);
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
|
|
Loading…
Reference in New Issue