1
0
mirror of https://github.com/NekoX-Dev/NekoX.git synced 2024-12-15 06:49:28 +01:00
This commit is contained in:
世界 2021-02-08 13:07:15 +08:00
parent 5a2b2430a4
commit abdcfc28d8
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
4 changed files with 43 additions and 20 deletions

View File

@ -1,8 +1,8 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
def verName = "7.4.2-rc03"
def verCode = 180
def verName = "7.4.2-rc04"
def verCode = 182
def officialVer = "7.4.2"
def officialCode = 2227

View File

@ -17498,12 +17498,10 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
}
}
if (currentChat != null && ChatObject.canSendMessages(currentChat) && shareKeyItem != null) {
if (StrUtil.isBlank(NekoConfig.openPGPApp)) {
shareKeyItem.setVisibility(View.GONE);
} else {
shareKeyItem.setVisibility(View.VISIBLE);
}
if (currentChat != null && ChatObject.canSendMessages(currentChat) && StrUtil.isNotBlank(NekoConfig.openPGPApp) && shareKeyItem != null) {
shareKeyItem.setVisibility(View.VISIBLE);
} else {
shareKeyItem.setVisibility(View.GONE);
}
if (userBlocked || addToContactsButton.getVisibility() == View.GONE && reportSpamButton.getVisibility() == View.GONE) {

View File

@ -432,7 +432,33 @@ public class SessionsActivity extends BaseFragment implements NotificationCenter
}
if (newAuthorizationToOpen != null) {
if (currentType == 0) {
undoView = new UndoView(context) {
@Override
public void hide(boolean apply, int animated) {
if (!apply) {
TLRPC.TL_authorization authorization = (TLRPC.TL_authorization) getCurrentInfoObject();
TLRPC.TL_account_resetAuthorization req = new TLRPC.TL_account_resetAuthorization();
req.hash = authorization.hash;
ConnectionsManager.getInstance(currentAccount).sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> {
if (error == null) {
sessions.remove(authorization);
passwordSessions.remove(authorization);
updateRows();
if (listAdapter != null) {
listAdapter.notifyDataSetChanged();
}
loadSessions(true);
}
}));
}
super.hide(apply, animated);
}
};
frameLayout.addView(undoView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.BOTTOM | Gravity.LEFT, 8, 0, 8, 8));
}
if (newAuthorizationToOpen != null && undoView != null) {
AndroidUtilities.runOnUIThread(() -> undoView.showWithAction(0, UndoView.ACTION_QR_SESSION_ACCEPTED, newAuthorizationToOpen), 3000L);
}
}

View File

@ -28,13 +28,6 @@ import android.location.LocationManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import androidx.annotation.Keep;
import androidx.core.content.FileProvider;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.text.TextPaint;
import android.text.TextUtils;
import android.view.Gravity;
@ -46,13 +39,19 @@ import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.TextView;
import androidx.annotation.Keep;
import androidx.core.content.FileProvider;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.ApplicationLoader;
import org.telegram.messenger.BuildConfig;
import org.telegram.messenger.MediaDataController;
import org.telegram.messenger.FileLoader;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.MediaDataController;
import org.telegram.messenger.MessagesController;
import org.telegram.messenger.NotificationCenter;
import org.telegram.messenger.R;
@ -95,8 +94,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import tw.nekomimi.nekogram.NekoConfig;
public class ThemeActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate {
public final static int THEME_TYPE_BASIC = 0;
@ -509,7 +506,9 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
if (currentType == THEME_TYPE_BASIC) {
textSizeHeaderRow = rowCount++;
textSizeRow = rowCount++;
backgroundRow = rowCount++;
if (!"indigo.attheme".equals(Theme.getCurrentTheme().assetName)) {
backgroundRow = rowCount++;
}
newThemeInfoRow = rowCount++;
themeHeaderRow = rowCount++;
themeListRow = rowCount++;