mirror of
https://github.com/DrKLO/Telegram.git
synced 2024-12-22 06:25:14 +01:00
update to 9.6.2
This commit is contained in:
parent
c1e3121db2
commit
3c9a4c1f1f
96 changed files with 475 additions and 383 deletions
|
@ -6,7 +6,7 @@ import java.util.concurrent.CountDownLatch;
|
||||||
|
|
||||||
public class AnimatedFileDrawableStream implements FileLoadOperationStream {
|
public class AnimatedFileDrawableStream implements FileLoadOperationStream {
|
||||||
|
|
||||||
private final FileLoadOperation loadOperation;
|
private FileLoadOperation loadOperation;
|
||||||
private CountDownLatch countDownLatch;
|
private CountDownLatch countDownLatch;
|
||||||
private TLRPC.Document document;
|
private TLRPC.Document document;
|
||||||
private ImageLocation location;
|
private ImageLocation location;
|
||||||
|
@ -76,22 +76,30 @@ public class AnimatedFileDrawableStream implements FileLoadOperationStream {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
countDownLatch = new CountDownLatch(1);
|
||||||
if (loadOperation.isPaused() || lastOffset != offset || preview) {
|
if (loadOperation.isPaused() || lastOffset != offset || preview) {
|
||||||
FileLoader.getInstance(currentAccount).loadStreamFile(this, document, location, parentObject, offset, preview, loadingPriority);
|
FileLoadOperation loadOperation = FileLoader.getInstance(currentAccount).loadStreamFile(this, document, location, parentObject, offset, preview, loadingPriority);
|
||||||
|
if (this.loadOperation != loadOperation) {
|
||||||
|
this.loadOperation.removeStreamListener(this);
|
||||||
|
this.loadOperation = loadOperation;
|
||||||
|
}
|
||||||
|
lastOffset = offset + availableLength;
|
||||||
}
|
}
|
||||||
synchronized (sync) {
|
synchronized (sync) {
|
||||||
if (canceled) {
|
if (canceled) {
|
||||||
|
countDownLatch = null;
|
||||||
cancelLoadingInternal();
|
cancelLoadingInternal();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
countDownLatch = new CountDownLatch(1);
|
|
||||||
}
|
}
|
||||||
if (!preview) {
|
if (!preview) {
|
||||||
FileLoader.getInstance(currentAccount).setLoadingVideo(document, false, true);
|
FileLoader.getInstance(currentAccount).setLoadingVideo(document, false, true);
|
||||||
}
|
}
|
||||||
waitingForLoad = true;
|
if (countDownLatch != null) {
|
||||||
countDownLatch.await();
|
waitingForLoad = true;
|
||||||
waitingForLoad = false;
|
countDownLatch.await();
|
||||||
|
waitingForLoad = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lastOffset = offset + availableLength;
|
lastOffset = offset + availableLength;
|
||||||
|
@ -113,10 +121,17 @@ public class AnimatedFileDrawableStream implements FileLoadOperationStream {
|
||||||
synchronized (sync) {
|
synchronized (sync) {
|
||||||
if (countDownLatch != null) {
|
if (countDownLatch != null) {
|
||||||
countDownLatch.countDown();
|
countDownLatch.countDown();
|
||||||
|
countDownLatch = null;
|
||||||
if (removeLoading && !canceled && !preview) {
|
if (removeLoading && !canceled && !preview) {
|
||||||
FileLoader.getInstance(currentAccount).removeLoadingVideo(document, false, true);
|
FileLoader.getInstance(currentAccount).removeLoadingVideo(document, false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (parentObject instanceof MessageObject) {
|
||||||
|
MessageObject messageObject = (MessageObject) parentObject;
|
||||||
|
if (DownloadController.getInstance(messageObject.currentAccount).isDownloading(messageObject.getId())) {
|
||||||
|
removeLoading = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (removeLoading) {
|
if (removeLoading) {
|
||||||
cancelLoadingInternal();
|
cancelLoadingInternal();
|
||||||
}
|
}
|
||||||
|
@ -165,6 +180,7 @@ public class AnimatedFileDrawableStream implements FileLoadOperationStream {
|
||||||
public void newDataAvailable() {
|
public void newDataAvailable() {
|
||||||
if (countDownLatch != null) {
|
if (countDownLatch != null) {
|
||||||
countDownLatch.countDown();
|
countDownLatch.countDown();
|
||||||
|
countDownLatch = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ public class BuildVars {
|
||||||
public static boolean USE_CLOUD_STRINGS = true;
|
public static boolean USE_CLOUD_STRINGS = true;
|
||||||
public static boolean CHECK_UPDATES = true;
|
public static boolean CHECK_UPDATES = true;
|
||||||
public static boolean NO_SCOPED_STORAGE = Build.VERSION.SDK_INT <= 29;
|
public static boolean NO_SCOPED_STORAGE = Build.VERSION.SDK_INT <= 29;
|
||||||
public static int BUILD_VERSION = 3333;
|
public static int BUILD_VERSION = 3341;
|
||||||
public static String BUILD_VERSION_STRING = "9.6.1";
|
public static String BUILD_VERSION_STRING = "9.6.2";
|
||||||
public static int APP_ID = 4;
|
public static int APP_ID = 4;
|
||||||
public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103";
|
public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103";
|
||||||
|
|
||||||
|
|
|
@ -619,6 +619,14 @@ public class FileLoadOperation {
|
||||||
return result[0];
|
return result[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected File getCurrentFileFast() {
|
||||||
|
if (state == stateFinished) {
|
||||||
|
return cacheFileFinal;
|
||||||
|
} else {
|
||||||
|
return cacheFileTemp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private long getDownloadedLengthFromOffsetInternal(ArrayList<Range> ranges, final long offset, final long length) {
|
private long getDownloadedLengthFromOffsetInternal(ArrayList<Range> ranges, final long offset, final long length) {
|
||||||
if (ranges == null || state == stateFinished || ranges.isEmpty()) {
|
if (ranges == null || state == stateFinished || ranges.isEmpty()) {
|
||||||
if (state == stateFinished) {
|
if (state == stateFinished) {
|
||||||
|
|
|
@ -203,8 +203,8 @@ public class FileLoader extends BaseController {
|
||||||
super(instance);
|
super(instance);
|
||||||
filePathDatabase = new FilePathDatabase(instance);
|
filePathDatabase = new FilePathDatabase(instance);
|
||||||
for (int i = 0; i < smallFilesQueue.length; i++) {
|
for (int i = 0; i < smallFilesQueue.length; i++) {
|
||||||
smallFilesQueue[i] = new FileLoaderPriorityQueue("smallFilesQueue dc" + (i + 1), 5);
|
smallFilesQueue[i] = new FileLoaderPriorityQueue(instance, "smallFilesQueue dc" + (i + 1), FileLoaderPriorityQueue.TYPE_SMALL);
|
||||||
largeFilesQueue[i] = new FileLoaderPriorityQueue("largeFilesQueue dc" + (i + 1), 2);
|
largeFilesQueue[i] = new FileLoaderPriorityQueue(instance, "largeFilesQueue dc" + (i + 1), FileLoaderPriorityQueue.TYPE_LARGE);
|
||||||
}
|
}
|
||||||
dumpFilesQueue();
|
dumpFilesQueue();
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,11 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
public class FileLoaderPriorityQueue {
|
public class FileLoaderPriorityQueue {
|
||||||
|
|
||||||
private final int maxActiveOperationsCount;
|
public static final int TYPE_SMALL = 0;
|
||||||
|
public static final int TYPE_LARGE = 1;
|
||||||
String name;
|
String name;
|
||||||
|
int type;
|
||||||
|
int currentAccount;
|
||||||
|
|
||||||
private ArrayList<FileLoadOperation> allOperations = new ArrayList<>();
|
private ArrayList<FileLoadOperation> allOperations = new ArrayList<>();
|
||||||
|
|
||||||
|
@ -13,9 +16,10 @@ public class FileLoaderPriorityQueue {
|
||||||
private int PRIORITY_VALUE_NORMAL = (1 << 16);
|
private int PRIORITY_VALUE_NORMAL = (1 << 16);
|
||||||
private int PRIORITY_VALUE_LOW = 0;
|
private int PRIORITY_VALUE_LOW = 0;
|
||||||
|
|
||||||
FileLoaderPriorityQueue(String name, int maxActiveOperationsCount) {
|
FileLoaderPriorityQueue(int currentAccount, String name, int type) {
|
||||||
|
this.currentAccount = currentAccount;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.maxActiveOperationsCount = maxActiveOperationsCount;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void add(FileLoadOperation operation) {
|
public void add(FileLoadOperation operation) {
|
||||||
|
@ -55,7 +59,7 @@ public class FileLoaderPriorityQueue {
|
||||||
int activeCount = 0;
|
int activeCount = 0;
|
||||||
int lastPriority = 0;
|
int lastPriority = 0;
|
||||||
boolean pauseAllNextOperations = false;
|
boolean pauseAllNextOperations = false;
|
||||||
int max = maxActiveOperationsCount;
|
int max = type == TYPE_LARGE ? MessagesController.getInstance(currentAccount).largeQueueMaxActiveOperations : MessagesController.getInstance(currentAccount).smallQueueMaxActiveOperations;
|
||||||
for (int i = 0; i < allOperations.size(); i++) {
|
for (int i = 0; i < allOperations.size(); i++) {
|
||||||
FileLoadOperation operation = allOperations.get(i);
|
FileLoadOperation operation = allOperations.get(i);
|
||||||
if (i > 0 && !pauseAllNextOperations) {
|
if (i > 0 && !pauseAllNextOperations) {
|
||||||
|
|
|
@ -20,6 +20,7 @@ import com.google.android.exoplayer2.upstream.TransferListener;
|
||||||
import org.telegram.tgnet.TLRPC;
|
import org.telegram.tgnet.TLRPC;
|
||||||
|
|
||||||
import java.io.EOFException;
|
import java.io.EOFException;
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.RandomAccessFile;
|
import java.io.RandomAccessFile;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
|
@ -37,6 +38,7 @@ public class FileStreamLoadOperation extends BaseDataSource implements FileLoadO
|
||||||
private TLRPC.Document document;
|
private TLRPC.Document document;
|
||||||
private Object parentObject;
|
private Object parentObject;
|
||||||
private int currentAccount;
|
private int currentAccount;
|
||||||
|
File currentFile;
|
||||||
|
|
||||||
public FileStreamLoadOperation() {
|
public FileStreamLoadOperation() {
|
||||||
super(/* isNetwork= */ false);
|
super(/* isNetwork= */ false);
|
||||||
|
@ -78,7 +80,7 @@ public class FileStreamLoadOperation extends BaseDataSource implements FileLoadO
|
||||||
opened = true;
|
opened = true;
|
||||||
transferStarted(dataSpec);
|
transferStarted(dataSpec);
|
||||||
if (loadOperation != null) {
|
if (loadOperation != null) {
|
||||||
file = new RandomAccessFile(loadOperation.getCurrentFile(), "r");
|
file = new RandomAccessFile(currentFile = loadOperation.getCurrentFile(), "r");
|
||||||
file.seek(currentOffset);
|
file.seek(currentOffset);
|
||||||
}
|
}
|
||||||
return bytesRemaining;
|
return bytesRemaining;
|
||||||
|
@ -99,13 +101,16 @@ public class FileStreamLoadOperation extends BaseDataSource implements FileLoadO
|
||||||
while (availableLength == 0 && opened) {
|
while (availableLength == 0 && opened) {
|
||||||
availableLength = (int) loadOperation.getDownloadedLengthFromOffset(currentOffset, readLength)[0];
|
availableLength = (int) loadOperation.getDownloadedLengthFromOffset(currentOffset, readLength)[0];
|
||||||
if (availableLength == 0) {
|
if (availableLength == 0) {
|
||||||
|
countDownLatch = new CountDownLatch(1);
|
||||||
FileLoadOperation loadOperation = FileLoader.getInstance(currentAccount).loadStreamFile(this, document, null, parentObject, currentOffset, false, FileLoader.PRIORITY_HIGH);
|
FileLoadOperation loadOperation = FileLoader.getInstance(currentAccount).loadStreamFile(this, document, null, parentObject, currentOffset, false, FileLoader.PRIORITY_HIGH);
|
||||||
if (this.loadOperation != loadOperation) {
|
if (this.loadOperation != loadOperation) {
|
||||||
this.loadOperation.removeStreamListener(this);
|
this.loadOperation.removeStreamListener(this);
|
||||||
this.loadOperation = loadOperation;
|
this.loadOperation = loadOperation;
|
||||||
}
|
}
|
||||||
countDownLatch = new CountDownLatch(1);
|
if (countDownLatch != null) {
|
||||||
countDownLatch.await();
|
countDownLatch.await();
|
||||||
|
countDownLatch = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!opened) {
|
if (!opened) {
|
||||||
|
@ -146,14 +151,18 @@ public class FileStreamLoadOperation extends BaseDataSource implements FileLoadO
|
||||||
transferEnded();
|
transferEnded();
|
||||||
}
|
}
|
||||||
if (countDownLatch != null) {
|
if (countDownLatch != null) {
|
||||||
|
// FileLog.d("FileStreamLoadOperation count down");
|
||||||
countDownLatch.countDown();
|
countDownLatch.countDown();
|
||||||
|
countDownLatch = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void newDataAvailable() {
|
public void newDataAvailable() {
|
||||||
if (countDownLatch != null) {
|
if (countDownLatch != null) {
|
||||||
|
// FileLog.d("FileStreamLoadOperation count down");
|
||||||
countDownLatch.countDown();
|
countDownLatch.countDown();
|
||||||
|
countDownLatch = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1802,7 +1802,7 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
|
||||||
if (chatActivity == null || accelerometerSensor == null && (gravitySensor == null || linearAcceleration == null) || proximitySensor == null) {
|
if (chatActivity == null || accelerometerSensor == null && (gravitySensor == null || linearAcceleration == null) || proximitySensor == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!SharedConfig.enabledRaiseTo(true) && (playingMessageObject == null || !playingMessageObject.isVoice() && !playingMessageObject.isRoundVideo())) {
|
if (!SharedConfig.enabledRaiseTo(false) && (playingMessageObject == null || !playingMessageObject.isVoice() && !playingMessageObject.isRoundVideo())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
raiseChat = chatActivity;
|
raiseChat = chatActivity;
|
||||||
|
|
|
@ -2450,6 +2450,32 @@ public class MessageObject {
|
||||||
checkMediaExistance();
|
checkMediaExistance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean spoiledLoginCode = false;
|
||||||
|
private static Pattern loginCodePattern;
|
||||||
|
public void spoilLoginCode() { // spoil login code from +42777
|
||||||
|
if (!spoiledLoginCode && messageText != null && messageOwner != null && messageOwner.entities != null && messageOwner.from_id instanceof TLRPC.TL_peerUser && messageOwner.from_id.user_id == 777000) {
|
||||||
|
if (loginCodePattern == null) {
|
||||||
|
loginCodePattern = Pattern.compile("[\\d\\-]{5,7}");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
Matcher matcher = loginCodePattern.matcher(messageText);
|
||||||
|
if (matcher.find()) {
|
||||||
|
TLRPC.TL_messageEntitySpoiler spoiler = new TLRPC.TL_messageEntitySpoiler();
|
||||||
|
spoiler.offset = matcher.start();
|
||||||
|
spoiler.length = matcher.end() - spoiler.offset;
|
||||||
|
messageOwner.entities.add(spoiler);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
FileLog.e(e, false);
|
||||||
|
}
|
||||||
|
spoiledLoginCode = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean didSpoilLoginCode() {
|
||||||
|
return spoiledLoginCode;
|
||||||
|
}
|
||||||
|
|
||||||
private CharSequence getStringFrom(TLRPC.ChatReactions reactions) {
|
private CharSequence getStringFrom(TLRPC.ChatReactions reactions) {
|
||||||
if (reactions instanceof TLRPC.TL_chatReactionsAll) {
|
if (reactions instanceof TLRPC.TL_chatReactionsAll) {
|
||||||
return LocaleController.getString("AllReactions", R.string.AllReactions);
|
return LocaleController.getString("AllReactions", R.string.AllReactions);
|
||||||
|
@ -4764,6 +4790,9 @@ public class MessageObject {
|
||||||
}
|
}
|
||||||
matcher = urlPattern.matcher(charSequence);
|
matcher = urlPattern.matcher(charSequence);
|
||||||
}
|
}
|
||||||
|
if (!(charSequence instanceof Spannable)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Spannable spannable = (Spannable) charSequence;
|
Spannable spannable = (Spannable) charSequence;
|
||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
int start = matcher.start();
|
int start = matcher.start();
|
||||||
|
@ -5389,6 +5418,7 @@ public class MessageObject {
|
||||||
textWidth = 0;
|
textWidth = 0;
|
||||||
|
|
||||||
ArrayList<TLRPC.MessageEntity> entities = translated && messageOwner.translatedText != null ? messageOwner.translatedText.entities : messageOwner.entities;
|
ArrayList<TLRPC.MessageEntity> entities = translated && messageOwner.translatedText != null ? messageOwner.translatedText.entities : messageOwner.entities;
|
||||||
|
spoilLoginCode();
|
||||||
|
|
||||||
boolean hasEntities;
|
boolean hasEntities;
|
||||||
if (messageOwner.send_state != MESSAGE_SEND_STATE_SENT) {
|
if (messageOwner.send_state != MESSAGE_SEND_STATE_SENT) {
|
||||||
|
@ -5670,7 +5700,7 @@ public class MessageObject {
|
||||||
linesOffset += currentBlockLinesCount;
|
linesOffset += currentBlockLinesCount;
|
||||||
|
|
||||||
block.spoilers.clear();
|
block.spoilers.clear();
|
||||||
if (!isSpoilersRevealed) {
|
if (!isSpoilersRevealed && !spoiledLoginCode) {
|
||||||
SpoilerEffect.addSpoilers(null, block.textLayout, -1, linesMaxWidthWithLeft, null, block.spoilers);
|
SpoilerEffect.addSpoilers(null, block.textLayout, -1, linesMaxWidthWithLeft, null, block.spoilers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7578,6 +7608,9 @@ public class MessageObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean equals(MessageObject obj) {
|
public boolean equals(MessageObject obj) {
|
||||||
|
if (obj == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return getId() == obj.getId() && getDialogId() == obj.getDialogId();
|
return getId() == obj.getId() && getDialogId() == obj.getDialogId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ import android.os.SystemClock;
|
||||||
import android.telephony.TelephonyManager;
|
import android.telephony.TelephonyManager;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Base64;
|
import android.util.Base64;
|
||||||
|
import android.util.Log;
|
||||||
import android.util.Pair;
|
import android.util.Pair;
|
||||||
import android.util.SparseArray;
|
import android.util.SparseArray;
|
||||||
import android.util.SparseBooleanArray;
|
import android.util.SparseBooleanArray;
|
||||||
|
@ -133,6 +134,8 @@ public class MessagesController extends BaseController implements NotificationCe
|
||||||
private LongSparseIntArray pendingUnreadCounter = new LongSparseIntArray();
|
private LongSparseIntArray pendingUnreadCounter = new LongSparseIntArray();
|
||||||
private int lastPrintingStringCount;
|
private int lastPrintingStringCount;
|
||||||
private SparseArray<ChatlistUpdatesStat> chatlistFoldersUpdates = new SparseArray<>();
|
private SparseArray<ChatlistUpdatesStat> chatlistFoldersUpdates = new SparseArray<>();
|
||||||
|
public int largeQueueMaxActiveOperations = 2;
|
||||||
|
public int smallQueueMaxActiveOperations = 5;
|
||||||
|
|
||||||
class ChatlistUpdatesStat {
|
class ChatlistUpdatesStat {
|
||||||
public ChatlistUpdatesStat() {
|
public ChatlistUpdatesStat() {
|
||||||
|
@ -1321,6 +1324,8 @@ public class MessagesController extends BaseController implements NotificationCe
|
||||||
giftAttachMenuIcon = mainPreferences.getBoolean("giftAttachMenuIcon", false);
|
giftAttachMenuIcon = mainPreferences.getBoolean("giftAttachMenuIcon", false);
|
||||||
giftTextFieldIcon = mainPreferences.getBoolean("giftTextFieldIcon", false);
|
giftTextFieldIcon = mainPreferences.getBoolean("giftTextFieldIcon", false);
|
||||||
checkResetLangpack = mainPreferences.getInt("checkResetLangpack", 0);
|
checkResetLangpack = mainPreferences.getInt("checkResetLangpack", 0);
|
||||||
|
smallQueueMaxActiveOperations = mainPreferences.getInt("smallQueueMaxActiveOperations", 5);
|
||||||
|
largeQueueMaxActiveOperations = mainPreferences.getInt("largeQueueMaxActiveOperations", 2);
|
||||||
boolean isTest = ConnectionsManager.native_isTestBackend(currentAccount) != 0;
|
boolean isTest = ConnectionsManager.native_isTestBackend(currentAccount) != 0;
|
||||||
chatlistInvitesLimitDefault = mainPreferences.getInt("chatlistInvitesLimitDefault", 3);
|
chatlistInvitesLimitDefault = mainPreferences.getInt("chatlistInvitesLimitDefault", 3);
|
||||||
chatlistInvitesLimitPremium = mainPreferences.getInt("chatlistInvitesLimitPremium", isTest ? 5 : 20);
|
chatlistInvitesLimitPremium = mainPreferences.getInt("chatlistInvitesLimitPremium", isTest ? 5 : 20);
|
||||||
|
@ -2096,6 +2101,20 @@ public class MessagesController extends BaseController implements NotificationCe
|
||||||
for (int a = 0, N = object.value.size(); a < N; a++) {
|
for (int a = 0, N = object.value.size(); a < N; a++) {
|
||||||
TLRPC.TL_jsonObjectValue value = object.value.get(a);
|
TLRPC.TL_jsonObjectValue value = object.value.get(a);
|
||||||
switch (value.key) {
|
switch (value.key) {
|
||||||
|
case "large_queue_max_active_operations_count": {
|
||||||
|
if (value.value instanceof TLRPC.TL_jsonNumber) {
|
||||||
|
largeQueueMaxActiveOperations = (int) ((TLRPC.TL_jsonNumber) value.value).value;
|
||||||
|
editor.putInt("largeQueueMaxActiveOperations", largeQueueMaxActiveOperations);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "small_queue_max_active_operations_count": {
|
||||||
|
if (value.value instanceof TLRPC.TL_jsonNumber) {
|
||||||
|
smallQueueMaxActiveOperations = (int) ((TLRPC.TL_jsonNumber) value.value).value;
|
||||||
|
editor.putInt("smallQueueMaxActiveOperations", smallQueueMaxActiveOperations);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case "premium_gift_text_field_icon": {
|
case "premium_gift_text_field_icon": {
|
||||||
if (value.value instanceof TLRPC.TL_jsonBool) {
|
if (value.value instanceof TLRPC.TL_jsonBool) {
|
||||||
if (giftTextFieldIcon != ((TLRPC.TL_jsonBool) value.value).value) {
|
if (giftTextFieldIcon != ((TLRPC.TL_jsonBool) value.value).value) {
|
||||||
|
@ -2356,17 +2375,6 @@ public class MessagesController extends BaseController implements NotificationCe
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "autologin_token": {
|
|
||||||
if (value.value instanceof TLRPC.TL_jsonString) {
|
|
||||||
TLRPC.TL_jsonString string = (TLRPC.TL_jsonString) value.value;
|
|
||||||
if (!string.value.equals(autologinToken)) {
|
|
||||||
autologinToken = string.value;
|
|
||||||
editor.putString("autologinToken", autologinToken);
|
|
||||||
changed = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "emojies_send_dice": {
|
case "emojies_send_dice": {
|
||||||
HashSet<String> newEmojies = new HashSet<>();
|
HashSet<String> newEmojies = new HashSet<>();
|
||||||
if (value.value instanceof TLRPC.TL_jsonArray) {
|
if (value.value instanceof TLRPC.TL_jsonArray) {
|
||||||
|
@ -3364,6 +3372,7 @@ public class MessagesController extends BaseController implements NotificationCe
|
||||||
editor.putInt("webFileDatacenterId", webFileDatacenterId);
|
editor.putInt("webFileDatacenterId", webFileDatacenterId);
|
||||||
editor.putString("suggestedLangCode", suggestedLangCode);
|
editor.putString("suggestedLangCode", suggestedLangCode);
|
||||||
editor.putBoolean("forceTryIpV6", forceTryIpV6);
|
editor.putBoolean("forceTryIpV6", forceTryIpV6);
|
||||||
|
editor.putString("autologinToken", autologinToken = config.autologin_token);
|
||||||
editor.commit();
|
editor.commit();
|
||||||
|
|
||||||
getConnectionsManager().setForceTryIpV6(forceTryIpV6);
|
getConnectionsManager().setForceTryIpV6(forceTryIpV6);
|
||||||
|
@ -11199,9 +11208,9 @@ public class MessagesController extends BaseController implements NotificationCe
|
||||||
final ArrayList<TLRPC.User> userRestrictedPrivacy = new ArrayList<>();
|
final ArrayList<TLRPC.User> userRestrictedPrivacy = new ArrayList<>();
|
||||||
processed[0] = 0;
|
processed[0] = 0;
|
||||||
final Runnable showUserRestrictedPrivacyAlert = () -> {
|
final Runnable showUserRestrictedPrivacyAlert = () -> {
|
||||||
AndroidUtilities.runOnUIThread(() ->{
|
AndroidUtilities.runOnUIThread(() -> {
|
||||||
BaseFragment lastFragment = LaunchActivity.getLastFragment();
|
BaseFragment lastFragment = LaunchActivity.getLastFragment();
|
||||||
if (lastFragment != null && lastFragment.getParentActivity() != null) {
|
if (lastFragment != null && lastFragment.getParentActivity() != null && !lastFragment.getParentActivity().isFinishing()) {
|
||||||
// if (ChatObject.canUserDoAdminAction(currentChat, ChatObject.ACTION_INVITE)) {
|
// if (ChatObject.canUserDoAdminAction(currentChat, ChatObject.ACTION_INVITE)) {
|
||||||
LimitReachedBottomSheet restricterdUsersBottomSheet = new LimitReachedBottomSheet(lastFragment, lastFragment.getParentActivity(), LimitReachedBottomSheet.TYPE_ADD_MEMBERS_RESTRICTED, currentAccount);
|
LimitReachedBottomSheet restricterdUsersBottomSheet = new LimitReachedBottomSheet(lastFragment, lastFragment.getParentActivity(), LimitReachedBottomSheet.TYPE_ADD_MEMBERS_RESTRICTED, currentAccount);
|
||||||
restricterdUsersBottomSheet.setRestrictedUsers(currentChat, userRestrictedPrivacy);
|
restricterdUsersBottomSheet.setRestrictedUsers(currentChat, userRestrictedPrivacy);
|
||||||
|
|
|
@ -13871,7 +13871,7 @@ public class MessagesStorage extends BaseController {
|
||||||
}
|
}
|
||||||
if (message.media instanceof TLRPC.TL_messageMediaPoll) {
|
if (message.media instanceof TLRPC.TL_messageMediaPoll) {
|
||||||
TLRPC.TL_messageMediaPoll messageMediaPoll = (TLRPC.TL_messageMediaPoll) message.media;
|
TLRPC.TL_messageMediaPoll messageMediaPoll = (TLRPC.TL_messageMediaPoll) message.media;
|
||||||
if (!messageMediaPoll.results.recent_voters.isEmpty()) {
|
if (messageMediaPoll.results != null && messageMediaPoll.results.recent_voters != null && !messageMediaPoll.results.recent_voters.isEmpty()) {
|
||||||
usersToLoad.addAll(messageMediaPoll.results.recent_voters);
|
usersToLoad.addAll(messageMediaPoll.results.recent_voters);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1990,8 +1990,11 @@ public class NotificationsController extends BaseController {
|
||||||
};
|
};
|
||||||
|
|
||||||
private String replaceSpoilers(MessageObject messageObject) {
|
private String replaceSpoilers(MessageObject messageObject) {
|
||||||
|
if (messageObject == null || messageObject.messageOwner == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
String text = messageObject.messageOwner.message;
|
String text = messageObject.messageOwner.message;
|
||||||
if (text == null || messageObject == null || messageObject.messageOwner == null || messageObject.messageOwner.entities == null) {
|
if (text == null || messageObject.messageOwner.entities == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
StringBuilder stringBuilder = new StringBuilder(text);
|
StringBuilder stringBuilder = new StringBuilder(text);
|
||||||
|
@ -3204,7 +3207,8 @@ public class NotificationsController extends BaseController {
|
||||||
boolean secretChat = !isDefault && DialogObject.isEncryptedDialog(dialogId);
|
boolean secretChat = !isDefault && DialogObject.isEncryptedDialog(dialogId);
|
||||||
boolean shouldOverwrite = !isInApp && overwriteKey != null && preferences.getBoolean(overwriteKey, false);
|
boolean shouldOverwrite = !isInApp && overwriteKey != null && preferences.getBoolean(overwriteKey, false);
|
||||||
|
|
||||||
String soundHash = Utilities.MD5(sound == null ? "NoSound" : sound.toString());
|
int nosoundPatch = 2; // when changing code here about no-sound issues, make sure to increment this value
|
||||||
|
String soundHash = Utilities.MD5(sound == null ? "NoSound" + nosoundPatch : sound.toString());
|
||||||
if (soundHash != null && soundHash.length() > 5) {
|
if (soundHash != null && soundHash.length() > 5) {
|
||||||
soundHash = soundHash.substring(0, 5);
|
soundHash = soundHash.substring(0, 5);
|
||||||
}
|
}
|
||||||
|
@ -3422,7 +3426,8 @@ public class NotificationsController extends BaseController {
|
||||||
if (sound != null) {
|
if (sound != null) {
|
||||||
notificationChannel.setSound(sound, builder.build());
|
notificationChannel.setSound(sound, builder.build());
|
||||||
} else {
|
} else {
|
||||||
// notificationChannel.setSound(null, null);
|
// todo: deal with vendor messed up crash here later
|
||||||
|
notificationChannel.setSound(null, builder.build());
|
||||||
}
|
}
|
||||||
if (BuildVars.LOGS_ENABLED) {
|
if (BuildVars.LOGS_ENABLED) {
|
||||||
FileLog.d("create new channel " + channelId);
|
FileLog.d("create new channel " + channelId);
|
||||||
|
|
|
@ -1236,7 +1236,7 @@ public class SharedConfig {
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
proxyList.add(proxyInfo);
|
proxyList.add(0, proxyInfo);
|
||||||
saveProxyList();
|
saveProxyList();
|
||||||
return proxyInfo;
|
return proxyInfo;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4097,8 +4097,13 @@ public class VoIPService extends Service implements SensorEventListener, AudioMa
|
||||||
Notification incomingNotification;
|
Notification incomingNotification;
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||||
Bitmap avatar = getRoundAvatarBitmap(userOrChat);
|
Bitmap avatar = getRoundAvatarBitmap(userOrChat);
|
||||||
|
String presonName = ContactsController.formatName(userOrChat);
|
||||||
|
if (TextUtils.isEmpty(presonName)) {
|
||||||
|
//java.lang.IllegalArgumentException: person must have a non-empty a name
|
||||||
|
presonName = "___";
|
||||||
|
}
|
||||||
Person person = new Person.Builder()
|
Person person = new Person.Builder()
|
||||||
.setName(ContactsController.formatName(userOrChat))
|
.setName(presonName)
|
||||||
.setIcon(Icon.createWithAdaptiveBitmap(avatar)).build();
|
.setIcon(Icon.createWithAdaptiveBitmap(avatar)).build();
|
||||||
Notification.CallStyle notificationStyle = Notification.CallStyle.forIncomingCall(person, endPendingIntent, answerPendingIntent);
|
Notification.CallStyle notificationStyle = Notification.CallStyle.forIncomingCall(person, endPendingIntent, answerPendingIntent);
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ import android.os.Build;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Base64;
|
import android.util.Base64;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
|
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
|
||||||
|
|
||||||
|
|
|
@ -39,18 +39,15 @@ import androidx.annotation.Nullable;
|
||||||
import org.telegram.messenger.AndroidUtilities;
|
import org.telegram.messenger.AndroidUtilities;
|
||||||
import org.telegram.messenger.AnimationNotificationsLocker;
|
import org.telegram.messenger.AnimationNotificationsLocker;
|
||||||
import org.telegram.messenger.FileLog;
|
import org.telegram.messenger.FileLog;
|
||||||
import org.telegram.messenger.NotificationCenter;
|
|
||||||
import org.telegram.messenger.R;
|
import org.telegram.messenger.R;
|
||||||
import org.telegram.messenger.UserConfig;
|
import org.telegram.messenger.UserConfig;
|
||||||
import org.telegram.ui.Components.LayoutHelper;
|
import org.telegram.ui.Components.LayoutHelper;
|
||||||
import org.telegram.ui.Components.Paint.Views.LPhotoPaintView;
|
|
||||||
import org.telegram.ui.Components.PopupSwipeBackLayout;
|
import org.telegram.ui.Components.PopupSwipeBackLayout;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
public class ActionBarPopupWindow extends PopupWindow {
|
public class ActionBarPopupWindow extends PopupWindow {
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,6 @@ import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
|
|
||||||
public class Theme {
|
public class Theme {
|
||||||
|
@ -3526,6 +3525,8 @@ public class Theme {
|
||||||
public static final int key_chat_outBubbleSelected = colorsCount++;
|
public static final int key_chat_outBubbleSelected = colorsCount++;
|
||||||
public static final int key_chat_outBubbleShadow = colorsCount++;
|
public static final int key_chat_outBubbleShadow = colorsCount++;
|
||||||
public static final int key_chat_outBubbleGradient1 = colorsCount++;
|
public static final int key_chat_outBubbleGradient1 = colorsCount++;
|
||||||
|
public static final int key_chat_outBubbleGradient2 = colorsCount++;
|
||||||
|
public static final int key_chat_outBubbleGradient3 = colorsCount++;
|
||||||
public static final int myMessagesBubblesEndIndex = colorsCount;
|
public static final int myMessagesBubblesEndIndex = colorsCount;
|
||||||
|
|
||||||
//my messages
|
//my messages
|
||||||
|
@ -3598,8 +3599,6 @@ public class Theme {
|
||||||
public static final int key_chat_outBubbleLocationPlaceholder = colorsCount++;
|
public static final int key_chat_outBubbleLocationPlaceholder = colorsCount++;
|
||||||
public static final int key_chat_outBubbleSelectedOverlay = colorsCount++;
|
public static final int key_chat_outBubbleSelectedOverlay = colorsCount++;
|
||||||
public static final int key_chat_outPsaNameText = colorsCount++;
|
public static final int key_chat_outPsaNameText = colorsCount++;
|
||||||
public static final int key_chat_outBubbleGradient2 = colorsCount++;
|
|
||||||
public static final int key_chat_outBubbleGradient3 = colorsCount++;
|
|
||||||
public static final int key_chat_outBubbleGradientAnimated = colorsCount++;
|
public static final int key_chat_outBubbleGradientAnimated = colorsCount++;
|
||||||
public static final int key_chat_outBubbleGradientSelectedOverlay = colorsCount++;
|
public static final int key_chat_outBubbleGradientSelectedOverlay = colorsCount++;
|
||||||
public static final int key_chat_inBubbleSelected = colorsCount++;
|
public static final int key_chat_inBubbleSelected = colorsCount++;
|
||||||
|
@ -9077,7 +9076,7 @@ public class Theme {
|
||||||
setDrawableColorByKey(profile_verifiedCheckDrawable, key_profile_verifiedCheck);
|
setDrawableColorByKey(profile_verifiedCheckDrawable, key_profile_verifiedCheck);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Drawable getThemedDrawable(Context context, int resId, int key, Theme.ResourcesProvider resourcesProvider) {
|
public static Drawable getThemedDrawableByKey(Context context, int resId, int key, Theme.ResourcesProvider resourcesProvider) {
|
||||||
return getThemedDrawable(context, resId, getColor(key, resourcesProvider));
|
return getThemedDrawable(context, resId, getColor(key, resourcesProvider));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -402,7 +402,7 @@ public class ContactsAdapter extends RecyclerListView.SectionsAdapter {
|
||||||
case 5:
|
case 5:
|
||||||
default:
|
default:
|
||||||
view = new ShadowSectionCell(mContext);
|
view = new ShadowSectionCell(mContext);
|
||||||
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
Drawable drawable = Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
view.setBackgroundDrawable(combinedDrawable);
|
view.setBackgroundDrawable(combinedDrawable);
|
||||||
|
|
|
@ -583,7 +583,7 @@ public class DialogsAdapter extends RecyclerListView.SelectionAdapter implements
|
||||||
};
|
};
|
||||||
frameLayout.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundGray));
|
frameLayout.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundGray));
|
||||||
View v = new View(mContext);
|
View v = new View(mContext);
|
||||||
v.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
v.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
frameLayout.addView(v, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
|
frameLayout.addView(v, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
|
||||||
view = frameLayout;
|
view = frameLayout;
|
||||||
break;
|
break;
|
||||||
|
@ -616,7 +616,7 @@ public class DialogsAdapter extends RecyclerListView.SelectionAdapter implements
|
||||||
break;
|
break;
|
||||||
case VIEW_TYPE_SHADOW: {
|
case VIEW_TYPE_SHADOW: {
|
||||||
view = new ShadowSectionCell(mContext);
|
view = new ShadowSectionCell(mContext);
|
||||||
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
Drawable drawable = Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
view.setBackgroundDrawable(combinedDrawable);
|
view.setBackgroundDrawable(combinedDrawable);
|
||||||
|
@ -679,7 +679,7 @@ public class DialogsAdapter extends RecyclerListView.SelectionAdapter implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
Drawable drawable = Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
view.setBackgroundDrawable(combinedDrawable);
|
view.setBackgroundDrawable(combinedDrawable);
|
||||||
|
|
|
@ -12,14 +12,11 @@ import android.content.Context;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.location.Location;
|
import android.location.Location;
|
||||||
import android.os.Build;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.ViewPropertyAnimator;
|
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
|
|
||||||
import org.telegram.messenger.AndroidUtilities;
|
|
||||||
import org.telegram.messenger.LocaleController;
|
import org.telegram.messenger.LocaleController;
|
||||||
import org.telegram.messenger.LocationController;
|
import org.telegram.messenger.LocationController;
|
||||||
import org.telegram.messenger.MessageObject;
|
import org.telegram.messenger.MessageObject;
|
||||||
|
@ -27,7 +24,6 @@ import org.telegram.messenger.R;
|
||||||
import org.telegram.messenger.UserConfig;
|
import org.telegram.messenger.UserConfig;
|
||||||
import org.telegram.tgnet.TLRPC;
|
import org.telegram.tgnet.TLRPC;
|
||||||
import org.telegram.ui.ActionBar.Theme;
|
import org.telegram.ui.ActionBar.Theme;
|
||||||
import org.telegram.ui.Cells.EmptyCell;
|
|
||||||
import org.telegram.ui.Cells.HeaderCell;
|
import org.telegram.ui.Cells.HeaderCell;
|
||||||
import org.telegram.ui.Cells.LocationCell;
|
import org.telegram.ui.Cells.LocationCell;
|
||||||
import org.telegram.ui.Cells.LocationDirectionCell;
|
import org.telegram.ui.Cells.LocationDirectionCell;
|
||||||
|
@ -46,8 +42,6 @@ import java.util.Locale;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.google.android.gms.vision.Frame;
|
|
||||||
|
|
||||||
public class LocationActivityAdapter extends BaseLocationAdapter implements LocationController.LocationFetchCallback {
|
public class LocationActivityAdapter extends BaseLocationAdapter implements LocationController.LocationFetchCallback {
|
||||||
|
|
||||||
private int currentAccount = UserConfig.selectedAccount;
|
private int currentAccount = UserConfig.selectedAccount;
|
||||||
|
@ -326,7 +320,7 @@ public class LocationActivityAdapter extends BaseLocationAdapter implements Loca
|
||||||
}
|
}
|
||||||
case 9: {
|
case 9: {
|
||||||
view = new ShadowSectionCell(mContext);
|
view = new ShadowSectionCell(mContext);
|
||||||
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
|
Drawable drawable = Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(getThemedColor(Theme.key_windowBackgroundGray)), drawable);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(getThemedColor(Theme.key_windowBackgroundGray)), drawable);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
view.setBackgroundDrawable(combinedDrawable);
|
view.setBackgroundDrawable(combinedDrawable);
|
||||||
|
|
|
@ -93,6 +93,8 @@ public class ArchivedStickersActivity extends BaseFragment implements Notificati
|
||||||
actionBar.setAllowOverlayTitle(true);
|
actionBar.setAllowOverlayTitle(true);
|
||||||
if (currentType == MediaDataController.TYPE_IMAGE) {
|
if (currentType == MediaDataController.TYPE_IMAGE) {
|
||||||
actionBar.setTitle(LocaleController.getString("ArchivedStickers", R.string.ArchivedStickers));
|
actionBar.setTitle(LocaleController.getString("ArchivedStickers", R.string.ArchivedStickers));
|
||||||
|
} else if (currentType == MediaDataController.TYPE_EMOJIPACKS) {
|
||||||
|
actionBar.setTitle(LocaleController.getString("ArchivedEmojiPacks", R.string.ArchivedEmojiPacks));
|
||||||
} else {
|
} else {
|
||||||
actionBar.setTitle(LocaleController.getString("ArchivedMasks", R.string.ArchivedMasks));
|
actionBar.setTitle(LocaleController.getString("ArchivedMasks", R.string.ArchivedMasks));
|
||||||
}
|
}
|
||||||
|
@ -173,7 +175,7 @@ public class ArchivedStickersActivity extends BaseFragment implements Notificati
|
||||||
private void updateRows() {
|
private void updateRows() {
|
||||||
rowCount = 0;
|
rowCount = 0;
|
||||||
if (!sets.isEmpty()) {
|
if (!sets.isEmpty()) {
|
||||||
archiveInfoRow = currentType == MediaDataController.TYPE_IMAGE ? rowCount++ : -1;
|
archiveInfoRow = currentType == MediaDataController.TYPE_IMAGE || currentType == MediaDataController.TYPE_EMOJIPACKS ? rowCount++ : -1;
|
||||||
stickersStartRow = rowCount;
|
stickersStartRow = rowCount;
|
||||||
stickersEndRow = rowCount + sets.size();
|
stickersEndRow = rowCount + sets.size();
|
||||||
rowCount += sets.size();
|
rowCount += sets.size();
|
||||||
|
@ -342,7 +344,7 @@ public class ArchivedStickersActivity extends BaseFragment implements Notificati
|
||||||
if (position == archiveInfoRow) {
|
if (position == archiveInfoRow) {
|
||||||
cell.setTopPadding(17);
|
cell.setTopPadding(17);
|
||||||
cell.setBottomPadding(10);
|
cell.setBottomPadding(10);
|
||||||
cell.setText(LocaleController.getString("ArchivedStickersInfo", R.string.ArchivedStickersInfo));
|
cell.setText(currentType == MediaDataController.TYPE_EMOJIPACKS ? LocaleController.getString("ArchivedEmojiInfo", R.string.ArchivedEmojiInfo) : LocaleController.getString("ArchivedStickersInfo", R.string.ArchivedStickersInfo));
|
||||||
} else {
|
} else {
|
||||||
cell.setTopPadding(10);
|
cell.setTopPadding(10);
|
||||||
cell.setBottomPadding(17);
|
cell.setBottomPadding(17);
|
||||||
|
@ -366,11 +368,11 @@ public class ArchivedStickersActivity extends BaseFragment implements Notificati
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
view = new LoadingCell(mContext);
|
view = new LoadingCell(mContext);
|
||||||
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
view = new TextInfoPrivacyCell(mContext);
|
view = new TextInfoPrivacyCell(mContext);
|
||||||
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, RecyclerView.LayoutParams.WRAP_CONTENT));
|
view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, RecyclerView.LayoutParams.WRAP_CONTENT));
|
||||||
|
|
|
@ -20,7 +20,6 @@ import android.graphics.Path;
|
||||||
import android.graphics.PorterDuff;
|
import android.graphics.PorterDuff;
|
||||||
import android.graphics.PorterDuffColorFilter;
|
import android.graphics.PorterDuffColorFilter;
|
||||||
import android.graphics.RectF;
|
import android.graphics.RectF;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@ -108,9 +107,6 @@ import org.telegram.ui.Components.UndoView;
|
||||||
import org.telegram.ui.Storage.CacheModel;
|
import org.telegram.ui.Storage.CacheModel;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.nio.file.attribute.BasicFileAttributes;
|
|
||||||
import java.nio.file.attribute.FileTime;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -2562,7 +2558,7 @@ public class CacheControlActivity extends BaseFragment implements NotificationCe
|
||||||
// privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
// privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
// } else {
|
// } else {
|
||||||
privacyCell.setText(AndroidUtilities.replaceTags(item.text));
|
privacyCell.setText(AndroidUtilities.replaceTags(item.text));
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
// }
|
// }
|
||||||
break;
|
break;
|
||||||
case VIEW_TYPE_STORAGE:
|
case VIEW_TYPE_STORAGE:
|
||||||
|
|
|
@ -17,7 +17,6 @@ import android.graphics.drawable.Drawable;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.text.style.ImageSpan;
|
import android.text.style.ImageSpan;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
|
@ -991,7 +990,7 @@ public class CallLogActivity extends BaseFragment implements NotificationCenter.
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
view = new TextInfoPrivacyCell(mContext);
|
view = new TextInfoPrivacyCell(mContext);
|
||||||
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
view = new HeaderCell(mContext, Theme.key_windowBackgroundWhiteBlueHeader, 21, 15, 2, false, getResourceProvider());
|
view = new HeaderCell(mContext, Theme.key_windowBackgroundWhiteBlueHeader, 21, 15, 2, false, getResourceProvider());
|
||||||
|
|
|
@ -42,6 +42,8 @@ import org.telegram.ui.Components.LayoutHelper;
|
||||||
import org.telegram.ui.Components.ProgressButton;
|
import org.telegram.ui.Components.ProgressButton;
|
||||||
import org.telegram.ui.Components.ViewHelper;
|
import org.telegram.ui.Components.ViewHelper;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@SuppressLint("ViewConstructor")
|
@SuppressLint("ViewConstructor")
|
||||||
public class ArchivedStickerSetCell extends FrameLayout implements Checkable {
|
public class ArchivedStickerSetCell extends FrameLayout implements Checkable {
|
||||||
|
|
||||||
|
@ -154,15 +156,33 @@ public class ArchivedStickerSetCell extends FrameLayout implements Checkable {
|
||||||
setWillNotDraw(!needDivider);
|
setWillNotDraw(!needDivider);
|
||||||
|
|
||||||
textView.setText(stickersSet.set.title);
|
textView.setText(stickersSet.set.title);
|
||||||
valueTextView.setText(LocaleController.formatPluralString("Stickers", set.set.count));
|
if (set.set.emojis) {
|
||||||
|
valueTextView.setText(LocaleController.formatPluralString("EmojiCount", set.set.count));
|
||||||
|
} else {
|
||||||
|
valueTextView.setText(LocaleController.formatPluralString("Stickers", set.set.count));
|
||||||
|
}
|
||||||
|
|
||||||
TLRPC.Document sticker;
|
TLRPC.Document sticker = null;
|
||||||
if (set.cover != null) {
|
if (set instanceof TLRPC.TL_stickerSetFullCovered) {
|
||||||
|
ArrayList<TLRPC.Document> documents = ((TLRPC.TL_stickerSetFullCovered) set).documents;
|
||||||
|
if (documents == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
long thumb_document_id = set.set.thumb_document_id;
|
||||||
|
for (int i = 0; i < documents.size(); ++i) {
|
||||||
|
TLRPC.Document d = documents.get(i);
|
||||||
|
if (d != null && d.id == thumb_document_id) {
|
||||||
|
sticker = d;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (sticker == null && !documents.isEmpty()) {
|
||||||
|
sticker = documents.get(0);
|
||||||
|
}
|
||||||
|
} else if (set.cover != null) {
|
||||||
sticker = set.cover;
|
sticker = set.cover;
|
||||||
} else if (!set.covers.isEmpty()) {
|
} else if (!set.covers.isEmpty()) {
|
||||||
sticker = set.covers.get(0);
|
sticker = set.covers.get(0);
|
||||||
} else {
|
|
||||||
sticker = null;
|
|
||||||
}
|
}
|
||||||
if (sticker != null) {
|
if (sticker != null) {
|
||||||
TLObject object = FileLoader.getClosestPhotoSizeWithSize(set.set.thumbs, 90);
|
TLObject object = FileLoader.getClosestPhotoSizeWithSize(set.set.thumbs, 90);
|
||||||
|
|
|
@ -816,6 +816,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||||
|
|
||||||
private StaticLayout infoLayout;
|
private StaticLayout infoLayout;
|
||||||
private StaticLayout loadingProgressLayout;
|
private StaticLayout loadingProgressLayout;
|
||||||
|
private long loadingProgressLayoutHash;
|
||||||
private int infoX;
|
private int infoX;
|
||||||
private int infoWidth;
|
private int infoWidth;
|
||||||
|
|
||||||
|
@ -12072,6 +12073,11 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||||
loadingProgressLayout = null;
|
loadingProgressLayout = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
long hash = loadedSize << 16 + totalSize;
|
||||||
|
if (loadingProgressLayout != null && loadingProgressLayoutHash == hash) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
loadingProgressLayoutHash = hash;
|
||||||
|
|
||||||
if (lastLoadingSizeTotal == 0) {
|
if (lastLoadingSizeTotal == 0) {
|
||||||
lastLoadingSizeTotal = totalSize;
|
lastLoadingSizeTotal = totalSize;
|
||||||
|
@ -12122,18 +12128,6 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||||
w = (int) Math.ceil(Theme.chat_infoPaint.measureText(str));
|
w = (int) Math.ceil(Theme.chat_infoPaint.measureText(str));
|
||||||
}
|
}
|
||||||
loadingProgressLayout = new StaticLayout(str, Theme.chat_infoPaint, w, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
|
loadingProgressLayout = new StaticLayout(str, Theme.chat_infoPaint, w, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
|
||||||
// if (loadingProgressLayout != null) {
|
|
||||||
// loadingProgressLayout.copyStylesFrom(Theme.chat_infoPaint);
|
|
||||||
// loadingProgressLayout.setBounds(0, 0, w, (int) Theme.chat_infoPaint.getTextSize());
|
|
||||||
// loadingProgressLayout.setText(str, true);
|
|
||||||
// } else {
|
|
||||||
// loadingProgressLayout = new AnimatedTextView.AnimatedTextDrawable(false, true, true);
|
|
||||||
// loadingProgressLayout.setAnimationProperties(0.3f, 0, 140, CubicBezierInterpolator.EASE_OUT);
|
|
||||||
// loadingProgressLayout.setCallback(this);
|
|
||||||
// loadingProgressLayout.copyStylesFrom(Theme.chat_infoPaint);
|
|
||||||
// loadingProgressLayout.setBounds(0, 0, w, (int) Theme.chat_infoPaint.getTextSize());
|
|
||||||
// loadingProgressLayout.setText(str, false);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1437,6 +1437,9 @@ public class DialogCell extends BaseCell {
|
||||||
} else {
|
} else {
|
||||||
SpannableStringBuilder msgBuilder = new SpannableStringBuilder(message.caption);
|
SpannableStringBuilder msgBuilder = new SpannableStringBuilder(message.caption);
|
||||||
if (message != null && message.messageOwner != null) {
|
if (message != null && message.messageOwner != null) {
|
||||||
|
if (message != null) {
|
||||||
|
message.spoilLoginCode();
|
||||||
|
}
|
||||||
MediaDataController.addTextStyleRuns(message.messageOwner.entities, message.caption, msgBuilder, TextStyleSpan.FLAG_STYLE_SPOILER | TextStyleSpan.FLAG_STYLE_STRIKE);
|
MediaDataController.addTextStyleRuns(message.messageOwner.entities, message.caption, msgBuilder, TextStyleSpan.FLAG_STYLE_SPOILER | TextStyleSpan.FLAG_STYLE_STRIKE);
|
||||||
MediaDataController.addAnimatedEmojiSpans(message.messageOwner.entities, msgBuilder, currentMessagePaint == null ? null : currentMessagePaint.getFontMetricsInt());
|
MediaDataController.addAnimatedEmojiSpans(message.messageOwner.entities, msgBuilder, currentMessagePaint == null ? null : currentMessagePaint.getFontMetricsInt());
|
||||||
}
|
}
|
||||||
|
@ -1469,6 +1472,9 @@ public class DialogCell extends BaseCell {
|
||||||
messageString = AndroidUtilities.ellipsizeCenterEnd(messageString, message.highlightedWords.get(0), w, currentMessagePaint, 130).toString();
|
messageString = AndroidUtilities.ellipsizeCenterEnd(messageString, message.highlightedWords.get(0), w, currentMessagePaint, 130).toString();
|
||||||
} else {
|
} else {
|
||||||
SpannableStringBuilder stringBuilder = new SpannableStringBuilder(msgText);
|
SpannableStringBuilder stringBuilder = new SpannableStringBuilder(msgText);
|
||||||
|
if (message != null) {
|
||||||
|
message.spoilLoginCode();
|
||||||
|
}
|
||||||
MediaDataController.addTextStyleRuns(message, stringBuilder, TextStyleSpan.FLAG_STYLE_SPOILER | TextStyleSpan.FLAG_STYLE_STRIKE);
|
MediaDataController.addTextStyleRuns(message, stringBuilder, TextStyleSpan.FLAG_STYLE_SPOILER | TextStyleSpan.FLAG_STYLE_STRIKE);
|
||||||
if (message != null && message.messageOwner != null) {
|
if (message != null && message.messageOwner != null) {
|
||||||
MediaDataController.addAnimatedEmojiSpans(message.messageOwner.entities, stringBuilder, currentMessagePaint == null ? null : currentMessagePaint.getFontMetricsInt());
|
MediaDataController.addAnimatedEmojiSpans(message.messageOwner.entities, stringBuilder, currentMessagePaint == null ? null : currentMessagePaint.getFontMetricsInt());
|
||||||
|
@ -4679,6 +4685,9 @@ public class DialogCell extends BaseCell {
|
||||||
mess = mess.subSequence(0, 150);
|
mess = mess.subSequence(0, 150);
|
||||||
}
|
}
|
||||||
SpannableStringBuilder msgBuilder = new SpannableStringBuilder(mess);
|
SpannableStringBuilder msgBuilder = new SpannableStringBuilder(mess);
|
||||||
|
if (message != null) {
|
||||||
|
message.spoilLoginCode();
|
||||||
|
}
|
||||||
MediaDataController.addTextStyleRuns(message.messageOwner.entities, mess, msgBuilder, TextStyleSpan.FLAG_STYLE_SPOILER | TextStyleSpan.FLAG_STYLE_STRIKE);
|
MediaDataController.addTextStyleRuns(message.messageOwner.entities, mess, msgBuilder, TextStyleSpan.FLAG_STYLE_SPOILER | TextStyleSpan.FLAG_STYLE_STRIKE);
|
||||||
if (message != null && message.messageOwner != null) {
|
if (message != null && message.messageOwner != null) {
|
||||||
MediaDataController.addAnimatedEmojiSpans(message.messageOwner.entities, msgBuilder, currentMessagePaint == null ? null : currentMessagePaint.getFontMetricsInt());
|
MediaDataController.addAnimatedEmojiSpans(message.messageOwner.entities, msgBuilder, currentMessagePaint == null ? null : currentMessagePaint.getFontMetricsInt());
|
||||||
|
@ -4761,6 +4770,9 @@ public class DialogCell extends BaseCell {
|
||||||
mess = AndroidUtilities.replaceNewLines(mess);
|
mess = AndroidUtilities.replaceNewLines(mess);
|
||||||
}
|
}
|
||||||
mess = new SpannableStringBuilder(mess);
|
mess = new SpannableStringBuilder(mess);
|
||||||
|
if (message != null) {
|
||||||
|
message.spoilLoginCode();
|
||||||
|
}
|
||||||
MediaDataController.addTextStyleRuns(message, (Spannable) mess, TextStyleSpan.FLAG_STYLE_SPOILER | TextStyleSpan.FLAG_STYLE_STRIKE);
|
MediaDataController.addTextStyleRuns(message, (Spannable) mess, TextStyleSpan.FLAG_STYLE_SPOILER | TextStyleSpan.FLAG_STYLE_STRIKE);
|
||||||
if (message != null && message.messageOwner != null) {
|
if (message != null && message.messageOwner != null) {
|
||||||
MediaDataController.addAnimatedEmojiSpans(message.messageOwner.entities, mess, currentMessagePaint == null ? null : currentMessagePaint.getFontMetricsInt());
|
MediaDataController.addAnimatedEmojiSpans(message.messageOwner.entities, mess, currentMessagePaint == null ? null : currentMessagePaint.getFontMetricsInt());
|
||||||
|
|
|
@ -89,7 +89,7 @@ public class RequestPeerRequirementsCell extends LinearLayout {
|
||||||
}
|
}
|
||||||
addView(emptyView(12, Theme.getColor(Theme.key_windowBackgroundWhite)), LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
addView(emptyView(12, Theme.getColor(Theme.key_windowBackgroundWhite)), LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
|
||||||
addView(emptyView(12, Theme.getThemedDrawable(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow)), LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
addView(emptyView(12, Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow)), LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class ThemePreviewMessagesCell extends LinearLayout {
|
||||||
setOrientation(LinearLayout.VERTICAL);
|
setOrientation(LinearLayout.VERTICAL);
|
||||||
setPadding(0, AndroidUtilities.dp(11), 0, AndroidUtilities.dp(11));
|
setPadding(0, AndroidUtilities.dp(11), 0, AndroidUtilities.dp(11));
|
||||||
|
|
||||||
shadowDrawable = Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
|
shadowDrawable = Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
|
||||||
|
|
||||||
int date = (int) (System.currentTimeMillis() / 1000) - 60 * 60;
|
int date = (int) (System.currentTimeMillis() / 1000) - 60 * 60;
|
||||||
|
|
||||||
|
|
|
@ -517,7 +517,7 @@ public class ChangeUsernameActivity extends BaseFragment {
|
||||||
break;
|
break;
|
||||||
case VIEW_TYPE_HELP2:
|
case VIEW_TYPE_HELP2:
|
||||||
((TextInfoPrivacyCell) holder.itemView).setText(LocaleController.getString(botId != 0 ? R.string.BotUsernamesHelp : R.string.UsernamesProfileHelp));
|
((TextInfoPrivacyCell) holder.itemView).setText(LocaleController.getString(botId != 0 ? R.string.BotUsernamesHelp : R.string.UsernamesProfileHelp));
|
||||||
((TextInfoPrivacyCell) holder.itemView).setBackgroundDrawable(Theme.getThemedDrawable(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
((TextInfoPrivacyCell) holder.itemView).setBackgroundDrawable(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -650,7 +650,7 @@ public class ChangeUsernameActivity extends BaseFragment {
|
||||||
helpCell = this;
|
helpCell = this;
|
||||||
|
|
||||||
setPadding(AndroidUtilities.dp(18), AndroidUtilities.dp(10), AndroidUtilities.dp(18), AndroidUtilities.dp(17));
|
setPadding(AndroidUtilities.dp(18), AndroidUtilities.dp(10), AndroidUtilities.dp(18), AndroidUtilities.dp(17));
|
||||||
setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
setClipChildren(false);
|
setClipChildren(false);
|
||||||
|
|
||||||
text1View = new LinkSpanDrawable.LinksTextView(context);
|
text1View = new LinkSpanDrawable.LinksTextView(context);
|
||||||
|
|
|
@ -899,7 +899,7 @@ public class ChannelCreateActivity extends BaseFragment implements NotificationC
|
||||||
linkContainer.addView(checkTextView, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT, 18, 3, 18, 7));
|
linkContainer.addView(checkTextView, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT, 18, 3, 18, 7));
|
||||||
|
|
||||||
typeInfoCell = new TextInfoPrivacyCell(context);
|
typeInfoCell = new TextInfoPrivacyCell(context);
|
||||||
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
linearLayout.addView(typeInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout.addView(typeInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
|
||||||
loadingAdminedCell = new LoadingCell(context);
|
loadingAdminedCell = new LoadingCell(context);
|
||||||
|
@ -911,7 +911,7 @@ public class ChannelCreateActivity extends BaseFragment implements NotificationC
|
||||||
linearLayout.addView(adminnedChannelsLayout, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout.addView(adminnedChannelsLayout, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
|
||||||
adminedInfoCell = new TextInfoPrivacyCell(context);
|
adminedInfoCell = new TextInfoPrivacyCell(context);
|
||||||
adminedInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
adminedInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
linearLayout.addView(adminedInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout.addView(adminedInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
|
||||||
updatePrivatePublic();
|
updatePrivatePublic();
|
||||||
|
@ -960,10 +960,10 @@ public class ChannelCreateActivity extends BaseFragment implements NotificationC
|
||||||
if (loadingAdminedChannels) {
|
if (loadingAdminedChannels) {
|
||||||
loadingAdminedCell.setVisibility(View.VISIBLE);
|
loadingAdminedCell.setVisibility(View.VISIBLE);
|
||||||
adminnedChannelsLayout.setVisibility(View.GONE);
|
adminnedChannelsLayout.setVisibility(View.GONE);
|
||||||
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
adminedInfoCell.setVisibility(View.GONE);
|
adminedInfoCell.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
loadingAdminedCell.setVisibility(View.GONE);
|
loadingAdminedCell.setVisibility(View.GONE);
|
||||||
adminnedChannelsLayout.setVisibility(View.VISIBLE);
|
adminnedChannelsLayout.setVisibility(View.VISIBLE);
|
||||||
adminedInfoCell.setVisibility(View.VISIBLE);
|
adminedInfoCell.setVisibility(View.VISIBLE);
|
||||||
|
@ -974,7 +974,7 @@ public class ChannelCreateActivity extends BaseFragment implements NotificationC
|
||||||
sectionCell.setVisibility(View.VISIBLE);
|
sectionCell.setVisibility(View.VISIBLE);
|
||||||
adminedInfoCell.setVisibility(View.GONE);
|
adminedInfoCell.setVisibility(View.GONE);
|
||||||
adminnedChannelsLayout.setVisibility(View.GONE);
|
adminnedChannelsLayout.setVisibility(View.GONE);
|
||||||
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
linkContainer.setVisibility(View.VISIBLE);
|
linkContainer.setVisibility(View.VISIBLE);
|
||||||
loadingAdminedCell.setVisibility(View.GONE);
|
loadingAdminedCell.setVisibility(View.GONE);
|
||||||
if (isGroup) {
|
if (isGroup) {
|
||||||
|
|
|
@ -15931,7 +15931,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||||
if (!postponedScroll) {
|
if (!postponedScroll) {
|
||||||
chatAdapter.notifyDataSetChanged(true);
|
chatAdapter.notifyDataSetChanged(true);
|
||||||
}
|
}
|
||||||
if (isTopic && startLoadFromMessageId == getTopicId() && messArr.size() > 0 && messages.size() > 0) {
|
if (isTopic && startLoadFromMessageId == getTopicId() && messArr.size() > 0 && messages.size() > 0 && messArr.size() - 1 < messages.size()) {
|
||||||
scrollToMessage = messages.get(messArr.size() - 1);
|
scrollToMessage = messages.get(messArr.size() - 1);
|
||||||
}
|
}
|
||||||
if (scrollToMessage != null) {
|
if (scrollToMessage != null) {
|
||||||
|
@ -17252,18 +17252,18 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||||
isVotedChanged = true;
|
isVotedChanged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
createUndoView();
|
||||||
if (isVotedChanged && isQuiz && undoView != null && pollView instanceof ChatMessageCell) {
|
if (isVotedChanged && isQuiz && undoView != null && pollView instanceof ChatMessageCell) {
|
||||||
ChatMessageCell cell = (ChatMessageCell) pollView;
|
ChatMessageCell cell = (ChatMessageCell) pollView;
|
||||||
if (cell.isAnimatingPollAnswer()) {
|
if (cell.isAnimatingPollAnswer()) {
|
||||||
for (int a = 0, N = results.results.size(); a < N; a++) {
|
for (int a = 0, N = results.results.size(); a < N; a++) {
|
||||||
TLRPC.TL_pollAnswerVoters voters = results.results.get(a);
|
TLRPC.TL_pollAnswerVoters voters = results.results.get(a);
|
||||||
if (voters.chosen) {
|
if (voters.chosen) {
|
||||||
|
pollView.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING);
|
||||||
if (voters.correct) {
|
if (voters.correct) {
|
||||||
fireworksOverlay.start();
|
fireworksOverlay.start();
|
||||||
pollView.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING);
|
|
||||||
} else {
|
} else {
|
||||||
((ChatMessageCell) pollView).shakeView();
|
((ChatMessageCell) pollView).shakeView();
|
||||||
pollView.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING);
|
|
||||||
showPollSolution(cell.getMessageObject(), results);
|
showPollSolution(cell.getMessageObject(), results);
|
||||||
cell.showHintButton(false, true, 0);
|
cell.showHintButton(false, true, 0);
|
||||||
}
|
}
|
||||||
|
@ -31084,7 +31084,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||||
return animatingColors.valueAt(index);
|
return animatingColors.valueAt(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chatTheme == null && backgroundDrawable == null) {
|
if (chatTheme == null) {
|
||||||
return Theme.getColor(key);
|
return Theme.getColor(key);
|
||||||
}
|
}
|
||||||
int index = currentColors.indexOfKey(key);
|
int index = currentColors.indexOfKey(key);
|
||||||
|
@ -31092,18 +31092,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||||
return currentColors.valueAt(index);
|
return currentColors.valueAt(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Theme.key_chat_outBubbleGradient1 == key || Theme.key_chat_outBubbleGradient2 == key || Theme.key_chat_outBubbleGradient3 == key) {
|
|
||||||
index = currentColors.indexOfKey(Theme.key_chat_outBubble);
|
|
||||||
if (index < 0) {
|
|
||||||
int color = Theme.getColor(key);
|
|
||||||
if (color != 0) {
|
|
||||||
return color;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return currentColors.valueAt(index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int fallbackKey = Theme.getFallbackKey(key);
|
int fallbackKey = Theme.getFallbackKey(key);
|
||||||
if (fallbackKey >= 0) {
|
if (fallbackKey >= 0) {
|
||||||
index = currentColors.indexOfKey(fallbackKey);
|
index = currentColors.indexOfKey(fallbackKey);
|
||||||
|
|
|
@ -1162,7 +1162,7 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image
|
||||||
}
|
}
|
||||||
}, index, index + 10, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
}, index, index + 10, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
}
|
}
|
||||||
botInfoCell.setBackground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
botInfoCell.setBackground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
botInfoCell.setText(span);
|
botInfoCell.setText(span);
|
||||||
linearLayout1.addView(botInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout1.addView(botInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
}
|
}
|
||||||
|
@ -1194,15 +1194,15 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image
|
||||||
}, null));
|
}, null));
|
||||||
|
|
||||||
deleteInfoCell = new ShadowSectionCell(context);
|
deleteInfoCell = new ShadowSectionCell(context);
|
||||||
deleteInfoCell.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
deleteInfoCell.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
linearLayout1.addView(deleteInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout1.addView(deleteInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stickersInfoCell != null) {
|
if (stickersInfoCell != null) {
|
||||||
if (deleteInfoCell == null) {
|
if (deleteInfoCell == null) {
|
||||||
stickersInfoCell.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
stickersInfoCell.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
stickersInfoCell.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
stickersInfoCell.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -547,7 +547,7 @@ public class ChatEditTypeActivity extends BaseFragment implements NotificationCe
|
||||||
prevHeight = getHeight();
|
prevHeight = getHeight();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
checkTextView.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
checkTextView.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
checkTextView.setBottomPadding(6);
|
checkTextView.setBottomPadding(6);
|
||||||
linearLayout.addView(checkTextView, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout.addView(checkTextView, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
|
||||||
|
@ -1061,7 +1061,7 @@ public class ChatEditTypeActivity extends BaseFragment implements NotificationCe
|
||||||
break;
|
break;
|
||||||
case VIEW_TYPE_HELP:
|
case VIEW_TYPE_HELP:
|
||||||
((TextInfoPrivacyCell) holder.itemView).setText(LocaleController.getString("UsernamesChannelHelp", R.string.UsernamesChannelHelp));
|
((TextInfoPrivacyCell) holder.itemView).setText(LocaleController.getString("UsernamesChannelHelp", R.string.UsernamesChannelHelp));
|
||||||
((TextInfoPrivacyCell) holder.itemView).setBackgroundDrawable(Theme.getThemedDrawable(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
((TextInfoPrivacyCell) holder.itemView).setBackgroundDrawable(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1305,11 +1305,11 @@ public class ChatEditTypeActivity extends BaseFragment implements NotificationCe
|
||||||
if (loadingAdminedChannels) {
|
if (loadingAdminedChannels) {
|
||||||
loadingAdminedCell.setVisibility(View.VISIBLE);
|
loadingAdminedCell.setVisibility(View.VISIBLE);
|
||||||
adminnedChannelsLayout.setVisibility(View.GONE);
|
adminnedChannelsLayout.setVisibility(View.GONE);
|
||||||
typeInfoCell.setBackgroundDrawable(checkTextView.getVisibility() == View.VISIBLE ? null : Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
typeInfoCell.setBackgroundDrawable(checkTextView.getVisibility() == View.VISIBLE ? null : Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
adminedInfoCell.setBackgroundDrawable(null);
|
adminedInfoCell.setBackgroundDrawable(null);
|
||||||
} else {
|
} else {
|
||||||
adminedInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(adminedInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
adminedInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(adminedInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
||||||
loadingAdminedCell.setVisibility(View.GONE);
|
loadingAdminedCell.setVisibility(View.GONE);
|
||||||
adminnedChannelsLayout.setVisibility(View.VISIBLE);
|
adminnedChannelsLayout.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
@ -1322,7 +1322,7 @@ public class ChatEditTypeActivity extends BaseFragment implements NotificationCe
|
||||||
sectionCell2.setVisibility(View.VISIBLE);
|
sectionCell2.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
adminedInfoCell.setVisibility(View.GONE);
|
adminedInfoCell.setVisibility(View.GONE);
|
||||||
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
adminnedChannelsLayout.setVisibility(View.GONE);
|
adminnedChannelsLayout.setVisibility(View.GONE);
|
||||||
linkContainer.setVisibility(View.VISIBLE);
|
linkContainer.setVisibility(View.VISIBLE);
|
||||||
loadingAdminedCell.setVisibility(View.GONE);
|
loadingAdminedCell.setVisibility(View.GONE);
|
||||||
|
@ -1344,10 +1344,10 @@ public class ChatEditTypeActivity extends BaseFragment implements NotificationCe
|
||||||
checkTextView.setVisibility(!isPrivate && checkTextView.length() != 0 ? View.VISIBLE : View.GONE);
|
checkTextView.setVisibility(!isPrivate && checkTextView.length() != 0 ? View.VISIBLE : View.GONE);
|
||||||
manageLinksInfoCell.setText(LocaleController.getString("ManageLinksInfoHelp", R.string.ManageLinksInfoHelp));
|
manageLinksInfoCell.setText(LocaleController.getString("ManageLinksInfoHelp", R.string.ManageLinksInfoHelp));
|
||||||
if (isPrivate) {
|
if (isPrivate) {
|
||||||
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
typeInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
manageLinksInfoCell.setBackground(Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
manageLinksInfoCell.setBackground(Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
typeInfoCell.setBackgroundDrawable(checkTextView.getVisibility() == View.VISIBLE ? null : Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
typeInfoCell.setBackgroundDrawable(checkTextView.getVisibility() == View.VISIBLE ? null : Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
radioButtonCell1.setChecked(!isPrivate, true);
|
radioButtonCell1.setChecked(!isPrivate, true);
|
||||||
|
@ -1392,7 +1392,7 @@ public class ChatEditTypeActivity extends BaseFragment implements NotificationCe
|
||||||
} else {
|
} else {
|
||||||
checkTextView.setVisibility(View.GONE);
|
checkTextView.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
typeInfoCell.setBackgroundDrawable(checkTextView.getVisibility() == View.VISIBLE ? null : Theme.getThemedDrawable(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
typeInfoCell.setBackgroundDrawable(checkTextView.getVisibility() == View.VISIBLE ? null : Theme.getThemedDrawableByKey(typeInfoCell.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
if (checkRunnable != null) {
|
if (checkRunnable != null) {
|
||||||
AndroidUtilities.cancelRunOnUIThread(checkRunnable);
|
AndroidUtilities.cancelRunOnUIThread(checkRunnable);
|
||||||
checkRunnable = null;
|
checkRunnable = null;
|
||||||
|
|
|
@ -871,7 +871,7 @@ public class ChatLinkActivity extends BaseFragment implements NotificationCenter
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
view = new TextInfoPrivacyCell(mContext);
|
view = new TextInfoPrivacyCell(mContext);
|
||||||
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
view = new ManageChatTextCell(mContext);
|
view = new ManageChatTextCell(mContext);
|
||||||
|
|
|
@ -1519,7 +1519,7 @@ public class ChatRightsEditActivity extends BaseFragment {
|
||||||
break;
|
break;
|
||||||
case VIEW_TYPE_INFO_CELL:
|
case VIEW_TYPE_INFO_CELL:
|
||||||
view = new TextInfoPrivacyCell(mContext);
|
view = new TextInfoPrivacyCell(mContext);
|
||||||
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
case VIEW_TYPE_TRANSFER_CELL:
|
case VIEW_TYPE_TRANSFER_CELL:
|
||||||
default:
|
default:
|
||||||
|
@ -1833,13 +1833,13 @@ public class ChatRightsEditActivity extends BaseFragment {
|
||||||
shadowCell.setAlpha(1);
|
shadowCell.setAlpha(1);
|
||||||
}
|
}
|
||||||
if (position == rightsShadowRow) {
|
if (position == rightsShadowRow) {
|
||||||
shadowCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, removeAdminRow == -1 && rankRow == -1 ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
shadowCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, removeAdminRow == -1 && rankRow == -1 ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (position == removeAdminShadowRow) {
|
} else if (position == removeAdminShadowRow) {
|
||||||
shadowCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
shadowCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (position == rankInfoRow) {
|
} else if (position == rankInfoRow) {
|
||||||
shadowCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, canEdit ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
shadowCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, canEdit ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
shadowCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
shadowCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VIEW_TYPE_UNTIL_DATE_CELL:
|
case VIEW_TYPE_UNTIL_DATE_CELL:
|
||||||
|
|
|
@ -3002,7 +3002,7 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
|
||||||
} else {
|
} else {
|
||||||
privacyCell.setText(LocaleController.getString(R.string.NoBlockedGroup2));
|
privacyCell.setText(LocaleController.getString(R.string.NoBlockedGroup2));
|
||||||
}
|
}
|
||||||
privacyCell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
HeaderCell headerCell = new HeaderCell(mContext, Theme.key_windowBackgroundWhiteBlueHeader, 21, 11, false);
|
HeaderCell headerCell = new HeaderCell(mContext, Theme.key_windowBackgroundWhiteBlueHeader, 21, 11, false);
|
||||||
|
@ -3176,7 +3176,7 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
|
||||||
TextInfoPrivacyCell privacyCell = (TextInfoPrivacyCell) holder.itemView;
|
TextInfoPrivacyCell privacyCell = (TextInfoPrivacyCell) holder.itemView;
|
||||||
if (position == antiSpamInfoRow) {
|
if (position == antiSpamInfoRow) {
|
||||||
privacyCell.setText(LocaleController.getString("ChannelAntiSpamInfo", R.string.ChannelAntiSpamInfo));
|
privacyCell.setText(LocaleController.getString("ChannelAntiSpamInfo", R.string.ChannelAntiSpamInfo));
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (position == participantsInfoRow) {
|
} else if (position == participantsInfoRow) {
|
||||||
if (type == TYPE_BANNED || type == TYPE_KICKED) {
|
if (type == TYPE_BANNED || type == TYPE_KICKED) {
|
||||||
if (isChannel) {
|
if (isChannel) {
|
||||||
|
@ -3184,7 +3184,7 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
|
||||||
} else {
|
} else {
|
||||||
privacyCell.setText(LocaleController.getString("NoBlockedGroup2", R.string.NoBlockedGroup2));
|
privacyCell.setText(LocaleController.getString("NoBlockedGroup2", R.string.NoBlockedGroup2));
|
||||||
}
|
}
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (type == TYPE_ADMIN) {
|
} else if (type == TYPE_ADMIN) {
|
||||||
if (addNewRow != -1) {
|
if (addNewRow != -1) {
|
||||||
if (isChannel) {
|
if (isChannel) {
|
||||||
|
@ -3195,17 +3195,17 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
|
||||||
} else {
|
} else {
|
||||||
privacyCell.setText("");
|
privacyCell.setText("");
|
||||||
}
|
}
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (type == TYPE_USERS) {
|
} else if (type == TYPE_USERS) {
|
||||||
if (!isChannel || selectType != SELECT_TYPE_MEMBERS) {
|
if (!isChannel || selectType != SELECT_TYPE_MEMBERS) {
|
||||||
privacyCell.setText("");
|
privacyCell.setText("");
|
||||||
} else {
|
} else {
|
||||||
privacyCell.setText(LocaleController.getString("ChannelMembersInfo", R.string.ChannelMembersInfo));
|
privacyCell.setText(LocaleController.getString("ChannelMembersInfo", R.string.ChannelMembersInfo));
|
||||||
}
|
}
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
} else if (position == slowmodeInfoRow) {
|
} else if (position == slowmodeInfoRow) {
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
int seconds = getSecondsForIndex(selectedSlowmode);
|
int seconds = getSecondsForIndex(selectedSlowmode);
|
||||||
if (info == null || seconds == 0) {
|
if (info == null || seconds == 0) {
|
||||||
privacyCell.setText(LocaleController.getString("SlowmodeInfoOff", R.string.SlowmodeInfoOff));
|
privacyCell.setText(LocaleController.getString("SlowmodeInfoOff", R.string.SlowmodeInfoOff));
|
||||||
|
@ -3213,7 +3213,7 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
|
||||||
privacyCell.setText(LocaleController.formatString("SlowmodeInfoSelected", R.string.SlowmodeInfoSelected, formatSeconds(seconds)));
|
privacyCell.setText(LocaleController.formatString("SlowmodeInfoSelected", R.string.SlowmodeInfoSelected, formatSeconds(seconds)));
|
||||||
}
|
}
|
||||||
} else if (position == hideMembersInfoRow) {
|
} else if (position == hideMembersInfoRow) {
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
privacyCell.setText(LocaleController.getString("ChannelHideMembersInfo", R.string.ChannelHideMembersInfo));
|
privacyCell.setText(LocaleController.getString("ChannelHideMembersInfo", R.string.ChannelHideMembersInfo));
|
||||||
} else if (position == gigaInfoRow) {
|
} else if (position == gigaInfoRow) {
|
||||||
privacyCell.setText(LocaleController.getString("BroadcastGroupConvertInfo", R.string.BroadcastGroupConvertInfo));
|
privacyCell.setText(LocaleController.getString("BroadcastGroupConvertInfo", R.string.BroadcastGroupConvertInfo));
|
||||||
|
@ -3254,9 +3254,9 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (position == addNewSectionRow || type == TYPE_KICKED && position == participantsDividerRow && addNewRow == -1 && participantsStartRow == -1) {
|
if (position == addNewSectionRow || type == TYPE_KICKED && position == participantsDividerRow && addNewRow == -1 && participantsStartRow == -1) {
|
||||||
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class AutoDeletePopupWrapper {
|
||||||
FrameLayout gap = new FrameLayout(context);
|
FrameLayout gap = new FrameLayout(context);
|
||||||
gap.setBackgroundColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuSeparator, resourcesProvider));
|
gap.setBackgroundColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuSeparator, resourcesProvider));
|
||||||
View gapShadow = new View(context);
|
View gapShadow = new View(context);
|
||||||
gapShadow.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow, resourcesProvider));
|
gapShadow.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow, resourcesProvider));
|
||||||
gap.addView(gapShadow, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
|
gap.addView(gapShadow, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
|
||||||
gap.setTag(R.id.fit_width_tag, 1);
|
gap.setTag(R.id.fit_width_tag, 1);
|
||||||
windowLayout.addView(gap, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 8));
|
windowLayout.addView(gap, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 8));
|
||||||
|
|
|
@ -1436,7 +1436,7 @@ public class ChatAttachAlertDocumentLayout extends ChatAttachAlert.AttachAlertLa
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
view = new ShadowSectionCell(mContext);
|
view = new ShadowSectionCell(mContext);
|
||||||
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
Drawable drawable = Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(getThemedColor(Theme.key_windowBackgroundGray)), drawable);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(getThemedColor(Theme.key_windowBackgroundGray)), drawable);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
view.setBackgroundDrawable(combinedDrawable);
|
view.setBackgroundDrawable(combinedDrawable);
|
||||||
|
|
|
@ -771,7 +771,7 @@ public class ChatAttachAlertPollLayout extends ChatAttachAlert.AttachAlertLayout
|
||||||
}
|
}
|
||||||
case 2: {
|
case 2: {
|
||||||
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
|
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
|
||||||
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
|
Drawable drawable = Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(getThemedColor(Theme.key_windowBackgroundGray)), drawable);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(getThemedColor(Theme.key_windowBackgroundGray)), drawable);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
cell.setBackgroundDrawable(combinedDrawable);
|
cell.setBackgroundDrawable(combinedDrawable);
|
||||||
|
@ -880,7 +880,7 @@ public class ChatAttachAlertPollLayout extends ChatAttachAlert.AttachAlertLayout
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
view = new ShadowSectionCell(mContext);
|
view = new ShadowSectionCell(mContext);
|
||||||
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
Drawable drawable = Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(getThemedColor(Theme.key_windowBackgroundGray)), drawable);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(getThemedColor(Theme.key_windowBackgroundGray)), drawable);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
view.setBackgroundDrawable(combinedDrawable);
|
view.setBackgroundDrawable(combinedDrawable);
|
||||||
|
|
|
@ -296,7 +296,7 @@ public class ClearHistoryAlert extends BottomSheet {
|
||||||
linearLayout.addView(clearButton, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50, Gravity.LEFT | Gravity.TOP, 0, 0, 0, 0));
|
linearLayout.addView(clearButton, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50, Gravity.LEFT | Gravity.TOP, 0, 0, 0, 0));
|
||||||
|
|
||||||
ShadowSectionCell shadowSectionCell = new ShadowSectionCell(context);
|
ShadowSectionCell shadowSectionCell = new ShadowSectionCell(context);
|
||||||
Drawable drawable = Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
Drawable drawable = Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(getThemedColor(Theme.key_windowBackgroundGray)), drawable);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(getThemedColor(Theme.key_windowBackgroundGray)), drawable);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
shadowSectionCell.setBackgroundDrawable(combinedDrawable);
|
shadowSectionCell.setBackgroundDrawable(combinedDrawable);
|
||||||
|
@ -359,7 +359,7 @@ public class ClearHistoryAlert extends BottomSheet {
|
||||||
linearLayout.addView(slideChooseView, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, 0, 8, 0, 0));
|
linearLayout.addView(slideChooseView, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, 0, 8, 0, 0));
|
||||||
|
|
||||||
FrameLayout buttonContainer = new FrameLayout(context);
|
FrameLayout buttonContainer = new FrameLayout(context);
|
||||||
Drawable drawable = Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
|
Drawable drawable = Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(getThemedColor(Theme.key_windowBackgroundGray)), drawable);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(getThemedColor(Theme.key_windowBackgroundGray)), drawable);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
buttonContainer.setBackgroundDrawable(combinedDrawable);
|
buttonContainer.setBackgroundDrawable(combinedDrawable);
|
||||||
|
|
|
@ -15,7 +15,6 @@ import android.graphics.Path;
|
||||||
import android.graphics.PorterDuff;
|
import android.graphics.PorterDuff;
|
||||||
import android.graphics.PorterDuffXfermode;
|
import android.graphics.PorterDuffXfermode;
|
||||||
import android.graphics.Shader;
|
import android.graphics.Shader;
|
||||||
import android.graphics.Xfermode;
|
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.graphics.drawable.ShapeDrawable;
|
import android.graphics.drawable.ShapeDrawable;
|
||||||
import android.text.Layout;
|
import android.text.Layout;
|
||||||
|
@ -32,12 +31,9 @@ import android.widget.FrameLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.core.graphics.ColorUtils;
|
|
||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.google.android.gms.vision.Frame;
|
|
||||||
|
|
||||||
import org.telegram.messenger.AndroidUtilities;
|
import org.telegram.messenger.AndroidUtilities;
|
||||||
import org.telegram.messenger.BotWebViewVibrationEffect;
|
import org.telegram.messenger.BotWebViewVibrationEffect;
|
||||||
import org.telegram.messenger.ChatObject;
|
import org.telegram.messenger.ChatObject;
|
||||||
|
@ -46,7 +42,6 @@ import org.telegram.messenger.LocaleController;
|
||||||
import org.telegram.messenger.MessagesController;
|
import org.telegram.messenger.MessagesController;
|
||||||
import org.telegram.messenger.NotificationCenter;
|
import org.telegram.messenger.NotificationCenter;
|
||||||
import org.telegram.messenger.R;
|
import org.telegram.messenger.R;
|
||||||
import org.telegram.messenger.UserConfig;
|
|
||||||
import org.telegram.messenger.UserObject;
|
import org.telegram.messenger.UserObject;
|
||||||
import org.telegram.messenger.Utilities;
|
import org.telegram.messenger.Utilities;
|
||||||
import org.telegram.tgnet.TLObject;
|
import org.telegram.tgnet.TLObject;
|
||||||
|
@ -58,15 +53,12 @@ import org.telegram.ui.ActionBar.Theme;
|
||||||
import org.telegram.ui.Cells.GroupCreateUserCell;
|
import org.telegram.ui.Cells.GroupCreateUserCell;
|
||||||
import org.telegram.ui.Cells.TextInfoPrivacyCell;
|
import org.telegram.ui.Cells.TextInfoPrivacyCell;
|
||||||
import org.telegram.ui.ChatActivity;
|
import org.telegram.ui.ChatActivity;
|
||||||
import org.telegram.ui.Components.Premium.LimitReachedBottomSheet;
|
|
||||||
import org.telegram.ui.DialogsActivity;
|
import org.telegram.ui.DialogsActivity;
|
||||||
import org.telegram.ui.FilterChatlistActivity;
|
|
||||||
import org.telegram.ui.FilterCreateActivity;
|
import org.telegram.ui.FilterCreateActivity;
|
||||||
import org.telegram.ui.FiltersSetupActivity;
|
import org.telegram.ui.FiltersSetupActivity;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
public class FolderBottomSheet extends BottomSheetWithRecyclerListView {
|
public class FolderBottomSheet extends BottomSheetWithRecyclerListView {
|
||||||
|
|
||||||
|
@ -1020,7 +1012,7 @@ public class FolderBottomSheet extends BottomSheetWithRecyclerListView {
|
||||||
}
|
}
|
||||||
} else if (viewType == VIEW_TYPE_HINT) {
|
} else if (viewType == VIEW_TYPE_HINT) {
|
||||||
TextInfoPrivacyCell hintCell = (TextInfoPrivacyCell) holder.itemView;
|
TextInfoPrivacyCell hintCell = (TextInfoPrivacyCell) holder.itemView;
|
||||||
hintCell.setForeground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
hintCell.setForeground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
if (position == alreadySectionRow || position == sectionRow || peers == null || peers.isEmpty()) {
|
if (position == alreadySectionRow || position == sectionRow || peers == null || peers.isEmpty()) {
|
||||||
hintCell.setFixedSize(12);
|
hintCell.setFixedSize(12);
|
||||||
hintCell.setText("");
|
hintCell.setText("");
|
||||||
|
|
|
@ -2037,9 +2037,15 @@ public class InstantCameraView extends FrameLayout implements NotificationCenter
|
||||||
long startWriteTime = input.offset[input.lastWroteBuffer];
|
long startWriteTime = input.offset[input.lastWroteBuffer];
|
||||||
for (int a = input.lastWroteBuffer; a <= input.results; a++) {
|
for (int a = input.lastWroteBuffer; a <= input.results; a++) {
|
||||||
if (a < input.results) {
|
if (a < input.results) {
|
||||||
if (!running && input.offset[a] >= videoLast - desyncTime) {
|
long totalTime = input.offset[a] - audioStartTime;
|
||||||
|
if (!running && (input.offset[a] >= videoLast - desyncTime || totalTime >= 60_000000)) {
|
||||||
if (BuildVars.LOGS_ENABLED) {
|
if (BuildVars.LOGS_ENABLED) {
|
||||||
FileLog.d("stop audio encoding because of stoped video recording at " + input.offset[a] + " last video " + videoLast);
|
if (totalTime >= 60_000000) {
|
||||||
|
FileLog.d("stop audio encoding because recorded time more than 60s");
|
||||||
|
} else {
|
||||||
|
FileLog.d("stop audio encoding because of stoped video recording at " + input.offset[a] + " last video " + videoLast);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
audioStopedByTime = true;
|
audioStopedByTime = true;
|
||||||
isLast = true;
|
isLast = true;
|
||||||
|
@ -2084,7 +2090,9 @@ public class InstantCameraView extends FrameLayout implements NotificationCenter
|
||||||
}
|
}
|
||||||
long dt, alphaDt;
|
long dt, alphaDt;
|
||||||
if (!lastCameraId.equals(cameraId)) {
|
if (!lastCameraId.equals(cameraId)) {
|
||||||
// lastTimestamp = -1;
|
if (timestampNanos - lastTimestamp > 10_000) {
|
||||||
|
lastTimestamp = -1;
|
||||||
|
}
|
||||||
lastCameraId = cameraId;
|
lastCameraId = cameraId;
|
||||||
}
|
}
|
||||||
if (lastTimestamp == -1) {
|
if (lastTimestamp == -1) {
|
||||||
|
@ -2741,7 +2749,7 @@ public class InstantCameraView extends FrameLayout implements NotificationCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
private String createFragmentShader(Size previewSize) {
|
private String createFragmentShader(Size previewSize) {
|
||||||
if (!allowBigSizeCamera() || Math.max(previewSize.getHeight(), previewSize.getWidth()) * 0.7f < MessagesController.getInstance(currentAccount).roundVideoSize) {
|
if (!SharedConfig.deviceIsHigh() || !allowBigSizeCamera() || Math.max(previewSize.getHeight(), previewSize.getWidth()) * 0.7f < MessagesController.getInstance(currentAccount).roundVideoSize) {
|
||||||
return "#extension GL_OES_EGL_image_external : require\n" +
|
return "#extension GL_OES_EGL_image_external : require\n" +
|
||||||
"precision highp float;\n" +
|
"precision highp float;\n" +
|
||||||
"varying vec2 vTextureCoord;\n" +
|
"varying vec2 vTextureCoord;\n" +
|
||||||
|
|
|
@ -6,7 +6,6 @@ import android.animation.AnimatorSet;
|
||||||
import android.animation.ObjectAnimator;
|
import android.animation.ObjectAnimator;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Color;
|
|
||||||
import android.graphics.RectF;
|
import android.graphics.RectF;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
|
@ -48,7 +47,6 @@ import org.telegram.ui.ManageLinksActivity;
|
||||||
import org.telegram.ui.ProfileActivity;
|
import org.telegram.ui.ProfileActivity;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
@ -399,7 +397,7 @@ public class InviteLinkBottomSheet extends BottomSheet {
|
||||||
} else if (view instanceof LinkActionView) {
|
} else if (view instanceof LinkActionView) {
|
||||||
((LinkActionView) view).updateColors();
|
((LinkActionView) view).updateColors();
|
||||||
} else if (view instanceof TextInfoPrivacyCell) {
|
} else if (view instanceof TextInfoPrivacyCell) {
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), Theme.getThemedDrawable(view.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), Theme.getThemedDrawableByKey(view.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
view.setBackground(combinedDrawable);
|
view.setBackground(combinedDrawable);
|
||||||
((TextInfoPrivacyCell) view).setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText4));
|
((TextInfoPrivacyCell) view).setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText4));
|
||||||
|
@ -409,13 +407,13 @@ public class InviteLinkBottomSheet extends BottomSheet {
|
||||||
RecyclerView.ViewHolder holder = listView.getChildViewHolder(view);
|
RecyclerView.ViewHolder holder = listView.getChildViewHolder(view);
|
||||||
if (holder != null) {
|
if (holder != null) {
|
||||||
if (holder.getItemViewType() == 7) {
|
if (holder.getItemViewType() == 7) {
|
||||||
Drawable shadowDrawable = Theme.getThemedDrawable(view.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
|
Drawable shadowDrawable = Theme.getThemedDrawableByKey(view.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
|
||||||
Drawable background = new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray));
|
Drawable background = new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray));
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
view.setBackgroundDrawable(combinedDrawable);
|
view.setBackgroundDrawable(combinedDrawable);
|
||||||
} else if (holder.getItemViewType() == 2) {
|
} else if (holder.getItemViewType() == 2) {
|
||||||
Drawable shadowDrawable = Theme.getThemedDrawable(view.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
Drawable shadowDrawable = Theme.getThemedDrawableByKey(view.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
||||||
Drawable background = new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray));
|
Drawable background = new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray));
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
|
@ -653,7 +651,7 @@ public class InviteLinkBottomSheet extends BottomSheet {
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
view = new TimerPrivacyCell(context);
|
view = new TimerPrivacyCell(context);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
view.setBackground(combinedDrawable);
|
view.setBackground(combinedDrawable);
|
||||||
break;
|
break;
|
||||||
|
@ -675,7 +673,7 @@ public class InviteLinkBottomSheet extends BottomSheet {
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
view = new ShadowSectionCell(context, 12);
|
view = new ShadowSectionCell(context, 12);
|
||||||
Drawable shadowDrawable = Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
|
Drawable shadowDrawable = Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
|
||||||
Drawable background = new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray));
|
Drawable background = new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray));
|
||||||
combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
|
combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
|
|
|
@ -1733,7 +1733,7 @@ public class LPhotoPaintView extends SizeNotifierFrameLayoutPhoto implements IPh
|
||||||
currentCanvas.scale(v.getScaleX(), v.getScaleY());
|
currentCanvas.scale(v.getScaleX(), v.getScaleY());
|
||||||
currentCanvas.rotate(v.getRotation());
|
currentCanvas.rotate(v.getRotation());
|
||||||
currentCanvas.translate(-entity.getWidth() / 2f, -entity.getHeight() / 2f);
|
currentCanvas.translate(-entity.getWidth() / 2f, -entity.getHeight() / 2f);
|
||||||
if (v instanceof TextPaintView) {
|
if (v instanceof TextPaintView && v.getHeight() > 0 && v.getWidth() > 0) {
|
||||||
Bitmap b = Bitmaps.createBitmap(v.getWidth(), v.getHeight(), Bitmap.Config.ARGB_8888);
|
Bitmap b = Bitmaps.createBitmap(v.getWidth(), v.getHeight(), Bitmap.Config.ARGB_8888);
|
||||||
Canvas c = new Canvas(b);
|
Canvas c = new Canvas(b);
|
||||||
v.draw(c);
|
v.draw(c);
|
||||||
|
|
|
@ -620,6 +620,8 @@ public class PhotoViewerCaptionEnterView extends FrameLayout implements Notifica
|
||||||
return -16777216;
|
return -16777216;
|
||||||
} else if (key == Theme.key_dialogFloatingButton) {
|
} else if (key == Theme.key_dialogFloatingButton) {
|
||||||
return -10177041;
|
return -10177041;
|
||||||
|
} else if (key == Theme.key_dialogFloatingIcon) {
|
||||||
|
return 0xffffffff;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,6 +171,9 @@ public class StickerSetBulletinLayout extends Bulletin.TwoLineLayout {
|
||||||
if (stickerSet.masks) {
|
if (stickerSet.masks) {
|
||||||
titleTextView.setText(LocaleController.getString("MasksArchived", R.string.MasksArchived));
|
titleTextView.setText(LocaleController.getString("MasksArchived", R.string.MasksArchived));
|
||||||
subtitleTextView.setText(LocaleController.formatString("MasksArchivedInfo", R.string.MasksArchivedInfo, stickerSet.title));
|
subtitleTextView.setText(LocaleController.formatString("MasksArchivedInfo", R.string.MasksArchivedInfo, stickerSet.title));
|
||||||
|
} else if (stickerSet.emojis) {
|
||||||
|
titleTextView.setText(LocaleController.getString("EmojiArchived", R.string.EmojiArchived));
|
||||||
|
subtitleTextView.setText(LocaleController.formatString("EmojiArchivedInfo", R.string.EmojiArchivedInfo, stickerSet.title));
|
||||||
} else {
|
} else {
|
||||||
titleTextView.setText(LocaleController.getString("StickersArchived", R.string.StickersArchived));
|
titleTextView.setText(LocaleController.getString("StickersArchived", R.string.StickersArchived));
|
||||||
subtitleTextView.setText(LocaleController.formatString("StickersArchivedInfo", R.string.StickersArchivedInfo, stickerSet.title));
|
subtitleTextView.setText(LocaleController.formatString("StickersArchivedInfo", R.string.StickersArchivedInfo, stickerSet.title));
|
||||||
|
|
|
@ -407,7 +407,7 @@ public class DataAutoDownloadActivity extends BaseFragment {
|
||||||
linearLayout.addView(checkCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 48));
|
linearLayout.addView(checkCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 48));
|
||||||
checkCell[0].setOnClickListener(v -> checkCell[0].setChecked(!checkCell[0].isChecked()));
|
checkCell[0].setOnClickListener(v -> checkCell[0].setChecked(!checkCell[0].isChecked()));
|
||||||
|
|
||||||
Drawable drawable = Theme.getThemedDrawable(getParentActivity(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
Drawable drawable = Theme.getThemedDrawableByKey(getParentActivity(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
infoCell.setBackgroundDrawable(combinedDrawable);
|
infoCell.setBackgroundDrawable(combinedDrawable);
|
||||||
|
@ -749,12 +749,12 @@ public class DataAutoDownloadActivity extends BaseFragment {
|
||||||
TextInfoPrivacyCell view = (TextInfoPrivacyCell) holder.itemView;
|
TextInfoPrivacyCell view = (TextInfoPrivacyCell) holder.itemView;
|
||||||
if (position == typeSectionRow) {
|
if (position == typeSectionRow) {
|
||||||
view.setText(LocaleController.getString("AutoDownloadAudioInfo", R.string.AutoDownloadAudioInfo));
|
view.setText(LocaleController.getString("AutoDownloadAudioInfo", R.string.AutoDownloadAudioInfo));
|
||||||
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
view.setFixedSize(0);
|
view.setFixedSize(0);
|
||||||
view.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
|
view.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
|
||||||
} else if (position == autoDownloadSectionRow) {
|
} else if (position == autoDownloadSectionRow) {
|
||||||
if (usageHeaderRow == -1) {
|
if (usageHeaderRow == -1) {
|
||||||
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
if (currentType == 0) {
|
if (currentType == 0) {
|
||||||
view.setText(LocaleController.getString("AutoDownloadOnMobileDataInfo", R.string.AutoDownloadOnMobileDataInfo));
|
view.setText(LocaleController.getString("AutoDownloadOnMobileDataInfo", R.string.AutoDownloadOnMobileDataInfo));
|
||||||
} else if (currentType == 1) {
|
} else if (currentType == 1) {
|
||||||
|
@ -764,7 +764,7 @@ public class DataAutoDownloadActivity extends BaseFragment {
|
||||||
}
|
}
|
||||||
view.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
|
view.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
|
||||||
} else {
|
} else {
|
||||||
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
view.setText(null);
|
view.setText(null);
|
||||||
view.setFixedSize(12);
|
view.setFixedSize(12);
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||||
|
@ -850,7 +850,7 @@ public class DataAutoDownloadActivity extends BaseFragment {
|
||||||
case 5:
|
case 5:
|
||||||
default: {
|
default: {
|
||||||
view = new TextInfoPrivacyCell(mContext);
|
view = new TextInfoPrivacyCell(mContext);
|
||||||
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, RecyclerView.LayoutParams.WRAP_CONTENT));
|
view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, RecyclerView.LayoutParams.WRAP_CONTENT));
|
||||||
|
|
|
@ -644,9 +644,9 @@ public class DataSettingsActivity extends BaseFragment {
|
||||||
switch (holder.getItemViewType()) {
|
switch (holder.getItemViewType()) {
|
||||||
case 0: {
|
case 0: {
|
||||||
if (position == clearDraftsSectionRow) {
|
if (position == clearDraftsSectionRow) {
|
||||||
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -914,7 +914,7 @@ public class DataSettingsActivity extends BaseFragment {
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
view = new TextInfoPrivacyCell(mContext);
|
view = new TextInfoPrivacyCell(mContext);
|
||||||
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
view = new NotificationsCheckCell(mContext);
|
view = new NotificationsCheckCell(mContext);
|
||||||
|
|
|
@ -624,7 +624,7 @@ public class DataUsage2Activity extends BaseFragment {
|
||||||
int bottomViewType;
|
int bottomViewType;
|
||||||
boolean bottom = position + 1 < itemInners.size() && (bottomViewType = itemInners.get(position + 1).viewType) != item.viewType && bottomViewType != VIEW_TYPE_SEPARATOR && bottomViewType != VIEW_TYPE_ROUNDING;
|
boolean bottom = position + 1 < itemInners.size() && (bottomViewType = itemInners.get(position + 1).viewType) != item.viewType && bottomViewType != VIEW_TYPE_SEPARATOR && bottomViewType != VIEW_TYPE_ROUNDING;
|
||||||
if (bottom) {
|
if (bottom) {
|
||||||
subtitleCell.setBackground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
subtitleCell.setBackground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
subtitleCell.setBackground(null);
|
subtitleCell.setBackground(null);
|
||||||
}
|
}
|
||||||
|
@ -637,11 +637,11 @@ public class DataUsage2Activity extends BaseFragment {
|
||||||
boolean top = position > 0 && item.viewType != itemInners.get(position - 1).viewType;
|
boolean top = position > 0 && item.viewType != itemInners.get(position - 1).viewType;
|
||||||
boolean bottom = position + 1 < itemInners.size() && itemInners.get(position + 1).viewType != item.viewType;
|
boolean bottom = position + 1 < itemInners.size() && itemInners.get(position + 1).viewType != item.viewType;
|
||||||
if (top && bottom) {
|
if (top && bottom) {
|
||||||
view.setBackground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
view.setBackground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (top) {
|
} else if (top) {
|
||||||
view.setBackground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
view.setBackground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (bottom) {
|
} else if (bottom) {
|
||||||
view.setBackground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
view.setBackground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
view.setBackground(null);
|
view.setBackground(null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -735,9 +735,9 @@ public class DataUsageActivity extends BaseFragment {
|
||||||
switch (holder.getItemViewType()) {
|
switch (holder.getItemViewType()) {
|
||||||
case 0: {
|
case 0: {
|
||||||
if (position == resetSection2Row) {
|
if (position == resetSection2Row) {
|
||||||
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -806,7 +806,7 @@ public class DataUsageActivity extends BaseFragment {
|
||||||
}
|
}
|
||||||
case 3: {
|
case 3: {
|
||||||
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
|
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
|
||||||
cell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
cell.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
cell.setText(LocaleController.formatString("NetworkUsageSince", R.string.NetworkUsageSince, LocaleController.getInstance().formatterStats.format(StatsController.getInstance(currentAccount).getResetStatsDate(currentType))));
|
cell.setText(LocaleController.formatString("NetworkUsageSince", R.string.NetworkUsageSince, LocaleController.getInstance().formatterStats.format(StatsController.getInstance(currentAccount).getResetStatsDate(currentType))));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -554,7 +554,7 @@ public class MemberRequestsDelegate implements MemberRequestCell.OnClickListener
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
view = new View(parent.getContext());
|
view = new View(parent.getContext());
|
||||||
view.setBackground(Theme.getThemedDrawable(parent.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
view.setBackground(Theme.getThemedDrawableByKey(parent.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
view = new View(parent.getContext()) {
|
view = new View(parent.getContext()) {
|
||||||
|
|
|
@ -45,7 +45,6 @@ import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.TextPaint;
|
import android.text.TextPaint;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
|
||||||
import android.util.LongSparseArray;
|
import android.util.LongSparseArray;
|
||||||
import android.util.Property;
|
import android.util.Property;
|
||||||
import android.util.StateSet;
|
import android.util.StateSet;
|
||||||
|
@ -4507,6 +4506,13 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||||
return fragmentView;
|
return fragmentView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isPremiumRestoreHintVisible() {
|
||||||
|
if (!MessagesController.getInstance(currentAccount).premiumLocked && folderId == 0) {
|
||||||
|
return MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_RESTORE") && !getUserConfig().isPremium();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isPremiumHintVisible() {
|
public boolean isPremiumHintVisible() {
|
||||||
if (!MessagesController.getInstance(currentAccount).premiumLocked && folderId == 0) {
|
if (!MessagesController.getInstance(currentAccount).premiumLocked && folderId == 0) {
|
||||||
if (MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_UPGRADE") && getUserConfig().isPremium() || MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_ANNUAL") && !getUserConfig().isPremium()) {
|
if (MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_UPGRADE") && getUserConfig().isPremium() || MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_ANNUAL") && !getUserConfig().isPremium()) {
|
||||||
|
@ -4646,7 +4652,25 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||||
if (dialogsHintCell == null) {
|
if (dialogsHintCell == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (isPremiumHintVisible()) {
|
if (isPremiumRestoreHintVisible()) {
|
||||||
|
dialogsHintCell.setVisibility(View.VISIBLE);
|
||||||
|
dialogsHintCell.setOnClickListener(v -> {
|
||||||
|
presentFragment(new PremiumPreviewFragment("dialogs_hint").setSelectAnnualByDefault());
|
||||||
|
AndroidUtilities.runOnUIThread(() -> {
|
||||||
|
MessagesController.getInstance(currentAccount).removeSuggestion(0, "PREMIUM_RESTORE");
|
||||||
|
updateDialogsHint();
|
||||||
|
}, 250);
|
||||||
|
});
|
||||||
|
dialogsHintCell.setText(
|
||||||
|
AndroidUtilities.replaceSingleTag(
|
||||||
|
LocaleController.formatString(R.string.RestorePremiumHintTitle, MediaDataController.getInstance(currentAccount).getPremiumHintAnnualDiscount(false)),
|
||||||
|
Theme.key_windowBackgroundWhiteValueText,
|
||||||
|
0,
|
||||||
|
null
|
||||||
|
),
|
||||||
|
LocaleController.getString(R.string.RestorePremiumHintMessage)
|
||||||
|
);
|
||||||
|
} else if (isPremiumHintVisible()) {
|
||||||
dialogsHintCell.setVisibility(View.VISIBLE);
|
dialogsHintCell.setVisibility(View.VISIBLE);
|
||||||
dialogsHintCell.setOnClickListener(v -> {
|
dialogsHintCell.setOnClickListener(v -> {
|
||||||
presentFragment(new PremiumPreviewFragment("dialogs_hint").setSelectAnnualByDefault());
|
presentFragment(new PremiumPreviewFragment("dialogs_hint").setSelectAnnualByDefault());
|
||||||
|
@ -7726,12 +7750,12 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||||
getMessagesController().deleteDialog(selectedDialog, 0, revoke);
|
getMessagesController().deleteDialog(selectedDialog, 0, revoke);
|
||||||
} else {
|
} else {
|
||||||
TLRPC.User currentUser = getMessagesController().getUser(getUserConfig().getClientUserId());
|
TLRPC.User currentUser = getMessagesController().getUser(getUserConfig().getClientUserId());
|
||||||
getMessagesController().deleteParticipantFromChat((int) -selectedDialog, currentUser, null, revoke, false);
|
getMessagesController().deleteParticipantFromChat(-selectedDialog, currentUser, null, revoke, false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
getMessagesController().deleteDialog(selectedDialog, 0, revoke);
|
getMessagesController().deleteDialog(selectedDialog, 0, revoke);
|
||||||
if (isBot && revoke) {
|
if (isBot && revoke) {
|
||||||
getMessagesController().blockPeer((int) selectedDialog);
|
getMessagesController().blockPeer(selectedDialog);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (AndroidUtilities.isTablet()) {
|
if (AndroidUtilities.isTablet()) {
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class DilogCacheBottomSheet extends BottomSheetWithRecyclerListView {
|
||||||
textInfoPrivacyCell.setFixedSize(12);
|
textInfoPrivacyCell.setFixedSize(12);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(
|
CombinedDrawable combinedDrawable = new CombinedDrawable(
|
||||||
new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)),
|
new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)),
|
||||||
Theme.getThemedDrawable(parent.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow)
|
Theme.getThemedDrawableByKey(parent.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow)
|
||||||
);
|
);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
textInfoPrivacyCell.setBackgroundDrawable(combinedDrawable);
|
textInfoPrivacyCell.setBackgroundDrawable(combinedDrawable);
|
||||||
|
|
|
@ -230,7 +230,7 @@ public class EditWidgetActivity extends BaseFragment {
|
||||||
}
|
}
|
||||||
updateDialogs();
|
updateDialogs();
|
||||||
|
|
||||||
shadowDrawable = Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
|
shadowDrawable = Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateDialogs() {
|
public void updateDialogs() {
|
||||||
|
@ -935,7 +935,7 @@ public class EditWidgetActivity extends BaseFragment {
|
||||||
switch (viewType) {
|
switch (viewType) {
|
||||||
case 0:
|
case 0:
|
||||||
view = new TextInfoPrivacyCell(mContext);
|
view = new TextInfoPrivacyCell(mContext);
|
||||||
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
view = new TextCell(mContext);
|
view = new TextCell(mContext);
|
||||||
|
|
|
@ -247,7 +247,7 @@ public class FeaturedStickersActivity extends BaseFragment implements Notificati
|
||||||
case 1:
|
case 1:
|
||||||
default:
|
default:
|
||||||
view = new TextInfoPrivacyCell(mContext);
|
view = new TextInfoPrivacyCell(mContext);
|
||||||
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, RecyclerView.LayoutParams.WRAP_CONTENT));
|
view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, RecyclerView.LayoutParams.WRAP_CONTENT));
|
||||||
|
|
|
@ -35,7 +35,6 @@ import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.ViewTreeObserver;
|
import android.view.ViewTreeObserver;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.accessibility.AccessibilityNodeInfo;
|
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
@ -46,7 +45,6 @@ import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.core.view.ViewCompat;
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
@ -73,9 +71,7 @@ import org.telegram.ui.ActionBar.SimpleTextView;
|
||||||
import org.telegram.ui.ActionBar.Theme;
|
import org.telegram.ui.ActionBar.Theme;
|
||||||
import org.telegram.ui.Cells.DialogCell;
|
import org.telegram.ui.Cells.DialogCell;
|
||||||
import org.telegram.ui.Cells.GroupCreateUserCell;
|
import org.telegram.ui.Cells.GroupCreateUserCell;
|
||||||
import org.telegram.ui.Cells.PollEditTextCell;
|
|
||||||
import org.telegram.ui.Cells.TextInfoPrivacyCell;
|
import org.telegram.ui.Cells.TextInfoPrivacyCell;
|
||||||
import org.telegram.ui.Components.AnimatedTextView;
|
|
||||||
import org.telegram.ui.Components.Bulletin;
|
import org.telegram.ui.Components.Bulletin;
|
||||||
import org.telegram.ui.Components.BulletinFactory;
|
import org.telegram.ui.Components.BulletinFactory;
|
||||||
import org.telegram.ui.Components.CircularProgressDrawable;
|
import org.telegram.ui.Components.CircularProgressDrawable;
|
||||||
|
@ -642,7 +638,7 @@ public class FilterChatlistActivity extends BaseFragment {
|
||||||
updateHintCell(false);
|
updateHintCell(false);
|
||||||
} else if (viewType == 2) {
|
} else if (viewType == 2) {
|
||||||
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
|
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
|
||||||
cell.setBackground(Theme.getThemedDrawable(getContext(), position == chatsSectionRow ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
cell.setBackground(Theme.getThemedDrawableByKey(getContext(), position == chatsSectionRow ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
if (position == chatsSectionRow) {
|
if (position == chatsSectionRow) {
|
||||||
cell.setFixedSize(0);
|
cell.setFixedSize(0);
|
||||||
if (invite == null || allowedPeers.isEmpty()) {
|
if (invite == null || allowedPeers.isEmpty()) {
|
||||||
|
|
|
@ -7,16 +7,13 @@ import android.animation.AnimatorListenerAdapter;
|
||||||
import android.animation.ValueAnimator;
|
import android.animation.ValueAnimator;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.SharedPreferences;
|
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
import android.graphics.PorterDuff;
|
import android.graphics.PorterDuff;
|
||||||
import android.graphics.PorterDuffColorFilter;
|
import android.graphics.PorterDuffColorFilter;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.graphics.drawable.RippleDrawable;
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.Layout;
|
import android.text.Layout;
|
||||||
|
@ -27,29 +24,21 @@ import android.text.StaticLayout;
|
||||||
import android.text.TextPaint;
|
import android.text.TextPaint;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
import android.text.style.CharacterStyle;
|
|
||||||
import android.text.style.DynamicDrawableSpan;
|
import android.text.style.DynamicDrawableSpan;
|
||||||
import android.text.style.ImageSpan;
|
import android.text.style.ImageSpan;
|
||||||
import android.text.style.ReplacementSpan;
|
import android.text.style.ReplacementSpan;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.KeyEvent;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.ViewTreeObserver;
|
|
||||||
import android.view.WindowManager;
|
|
||||||
import android.view.accessibility.AccessibilityEvent;
|
|
||||||
import android.view.accessibility.AccessibilityNodeInfo;
|
import android.view.accessibility.AccessibilityNodeInfo;
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.PopupWindow;
|
|
||||||
import android.widget.ScrollView;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.core.graphics.ColorUtils;
|
|
||||||
import androidx.recyclerview.widget.DefaultItemAnimator;
|
import androidx.recyclerview.widget.DefaultItemAnimator;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
@ -71,14 +60,11 @@ import org.telegram.tgnet.TLRPC;
|
||||||
import org.telegram.ui.ActionBar.ActionBar;
|
import org.telegram.ui.ActionBar.ActionBar;
|
||||||
import org.telegram.ui.ActionBar.ActionBarMenu;
|
import org.telegram.ui.ActionBar.ActionBarMenu;
|
||||||
import org.telegram.ui.ActionBar.ActionBarMenuItem;
|
import org.telegram.ui.ActionBar.ActionBarMenuItem;
|
||||||
import org.telegram.ui.ActionBar.ActionBarMenuSubItem;
|
|
||||||
import org.telegram.ui.ActionBar.ActionBarPopupWindow;
|
|
||||||
import org.telegram.ui.ActionBar.AlertDialog;
|
import org.telegram.ui.ActionBar.AlertDialog;
|
||||||
import org.telegram.ui.ActionBar.BaseFragment;
|
import org.telegram.ui.ActionBar.BaseFragment;
|
||||||
import org.telegram.ui.ActionBar.SimpleTextView;
|
import org.telegram.ui.ActionBar.SimpleTextView;
|
||||||
import org.telegram.ui.ActionBar.Theme;
|
import org.telegram.ui.ActionBar.Theme;
|
||||||
import org.telegram.ui.ActionBar.ThemeDescription;
|
import org.telegram.ui.ActionBar.ThemeDescription;
|
||||||
import org.telegram.ui.Cells.CreationTextCell;
|
|
||||||
import org.telegram.ui.Cells.HeaderCell;
|
import org.telegram.ui.Cells.HeaderCell;
|
||||||
import org.telegram.ui.Cells.PollEditTextCell;
|
import org.telegram.ui.Cells.PollEditTextCell;
|
||||||
import org.telegram.ui.Cells.ShadowSectionCell;
|
import org.telegram.ui.Cells.ShadowSectionCell;
|
||||||
|
@ -105,8 +91,6 @@ import org.telegram.ui.Components.UndoView;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class FilterCreateActivity extends BaseFragment {
|
public class FilterCreateActivity extends BaseFragment {
|
||||||
|
|
||||||
|
@ -1457,7 +1441,7 @@ public class FilterCreateActivity extends BaseFragment {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VIEW_TYPE_SHADOW: {
|
case VIEW_TYPE_SHADOW: {
|
||||||
holder.itemView.setBackground(Theme.getThemedDrawable(mContext, divider ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackground(Theme.getThemedDrawableByKey(mContext, divider ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VIEW_TYPE_BUTTON: {
|
case VIEW_TYPE_BUTTON: {
|
||||||
|
@ -1469,7 +1453,7 @@ public class FilterCreateActivity extends BaseFragment {
|
||||||
case VIEW_TYPE_SHADOW_TEXT: {
|
case VIEW_TYPE_SHADOW_TEXT: {
|
||||||
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
|
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
|
||||||
cell.setText(item.text);
|
cell.setText(item.text);
|
||||||
holder.itemView.setBackground(Theme.getThemedDrawable(mContext, divider ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackground(Theme.getThemedDrawableByKey(mContext, divider ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VIEW_TYPE_LINK: {
|
case VIEW_TYPE_LINK: {
|
||||||
|
@ -2328,7 +2312,7 @@ public class FilterCreateActivity extends BaseFragment {
|
||||||
cell.setFixedSize(12);
|
cell.setFixedSize(12);
|
||||||
cell.setText("");
|
cell.setText("");
|
||||||
}
|
}
|
||||||
cell.setForeground(Theme.getThemedDrawable(getContext(), divider ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
cell.setForeground(Theme.getThemedDrawableByKey(getContext(), divider ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (viewType == VIEW_TYPE_HEADER) {
|
} else if (viewType == VIEW_TYPE_HEADER) {
|
||||||
// HeaderView headerV = (HeaderView) holder.itemView;
|
// HeaderView headerV = (HeaderView) holder.itemView;
|
||||||
// textView.setText(item.text);
|
// textView.setText(item.text);
|
||||||
|
|
|
@ -1,16 +1,12 @@
|
||||||
package org.telegram.ui;
|
package org.telegram.ui;
|
||||||
|
|
||||||
import android.animation.ValueAnimator;
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.SharedPreferences;
|
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Paint;
|
|
||||||
import android.graphics.PorterDuff;
|
import android.graphics.PorterDuff;
|
||||||
import android.graphics.PorterDuffColorFilter;
|
import android.graphics.PorterDuffColorFilter;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.text.TextPaint;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
|
@ -33,7 +29,6 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||||
import org.telegram.messenger.AndroidUtilities;
|
import org.telegram.messenger.AndroidUtilities;
|
||||||
import org.telegram.messenger.Emoji;
|
import org.telegram.messenger.Emoji;
|
||||||
import org.telegram.messenger.FileLog;
|
import org.telegram.messenger.FileLog;
|
||||||
import org.telegram.messenger.GenericProvider;
|
|
||||||
import org.telegram.messenger.LocaleController;
|
import org.telegram.messenger.LocaleController;
|
||||||
import org.telegram.messenger.MessagesController;
|
import org.telegram.messenger.MessagesController;
|
||||||
import org.telegram.messenger.NotificationCenter;
|
import org.telegram.messenger.NotificationCenter;
|
||||||
|
@ -51,9 +46,7 @@ import org.telegram.ui.Cells.HeaderCell;
|
||||||
import org.telegram.ui.Cells.ShadowSectionCell;
|
import org.telegram.ui.Cells.ShadowSectionCell;
|
||||||
import org.telegram.ui.Components.Bulletin;
|
import org.telegram.ui.Components.Bulletin;
|
||||||
import org.telegram.ui.Components.BulletinFactory;
|
import org.telegram.ui.Components.BulletinFactory;
|
||||||
import org.telegram.ui.Components.CircularProgressDrawable;
|
|
||||||
import org.telegram.ui.Components.CombinedDrawable;
|
import org.telegram.ui.Components.CombinedDrawable;
|
||||||
import org.telegram.ui.Components.CrossfadeDrawable;
|
|
||||||
import org.telegram.ui.Components.CubicBezierInterpolator;
|
import org.telegram.ui.Components.CubicBezierInterpolator;
|
||||||
import org.telegram.ui.Components.FolderBottomSheet;
|
import org.telegram.ui.Components.FolderBottomSheet;
|
||||||
import org.telegram.ui.Components.ItemOptions;
|
import org.telegram.ui.Components.ItemOptions;
|
||||||
|
@ -68,7 +61,6 @@ import org.telegram.ui.Components.RecyclerListView;
|
||||||
import org.telegram.ui.Components.UndoView;
|
import org.telegram.ui.Components.UndoView;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class FiltersSetupActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate {
|
public class FiltersSetupActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate {
|
||||||
|
|
||||||
|
@ -777,7 +769,7 @@ public class FiltersSetupActivity extends BaseFragment implements NotificationCe
|
||||||
break;
|
break;
|
||||||
case VIEW_TYPE_HINT:
|
case VIEW_TYPE_HINT:
|
||||||
view = new HintInnerCell(mContext, R.raw.filters, AndroidUtilities.replaceTags(LocaleController.formatString("CreateNewFilterInfo", R.string.CreateNewFilterInfo)));
|
view = new HintInnerCell(mContext, R.raw.filters, AndroidUtilities.replaceTags(LocaleController.formatString("CreateNewFilterInfo", R.string.CreateNewFilterInfo)));
|
||||||
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
case VIEW_TYPE_FILTER:
|
case VIEW_TYPE_FILTER:
|
||||||
FilterCell filterCell = new FilterCell(mContext);
|
FilterCell filterCell = new FilterCell(mContext);
|
||||||
|
@ -938,7 +930,7 @@ public class FiltersSetupActivity extends BaseFragment implements NotificationCe
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VIEW_TYPE_SHADOW: {
|
case VIEW_TYPE_SHADOW: {
|
||||||
holder.itemView.setBackground(Theme.getThemedDrawable(mContext, divider ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackground(Theme.getThemedDrawableByKey(mContext, divider ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VIEW_TYPE_BUTTON: {
|
case VIEW_TYPE_BUTTON: {
|
||||||
|
|
|
@ -7145,7 +7145,7 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean showMenuForCell(View rendererCell) {
|
private boolean showMenuForCell(View rendererCell) {
|
||||||
if (itemAnimator.isRunning()) {
|
if (itemAnimator.isRunning() || getContext() == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (avatarPriviewTransitionInProgress || avatarsPreviewShowed) {
|
if (avatarPriviewTransitionInProgress || avatarsPreviewShowed) {
|
||||||
|
@ -7211,6 +7211,9 @@ public class GroupCallActivity extends BottomSheet implements NotificationCenter
|
||||||
|
|
||||||
boolean showWithAvatarPreview = !isLandscapeMode && !isTabletMode && !AndroidUtilities.isInMultiwindow;
|
boolean showWithAvatarPreview = !isLandscapeMode && !isTabletMode && !AndroidUtilities.isInMultiwindow;
|
||||||
TLRPC.TL_groupCallParticipant participant = view.getParticipant();
|
TLRPC.TL_groupCallParticipant participant = view.getParticipant();
|
||||||
|
if (participant == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Rect rect = new Rect();
|
Rect rect = new Rect();
|
||||||
|
|
||||||
|
|
|
@ -980,7 +980,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
|
||||||
switch (viewType) {
|
switch (viewType) {
|
||||||
case VIEW_TYPE_SHADOW_SECTION_CELL: {
|
case VIEW_TYPE_SHADOW_SECTION_CELL: {
|
||||||
view = new ShadowSectionCell(context);
|
view = new ShadowSectionCell(context);
|
||||||
Drawable drawable = Theme.getThemedDrawable(context, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow);
|
Drawable drawable = Theme.getThemedDrawableByKey(context, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
view.setBackgroundDrawable(combinedDrawable);
|
view.setBackgroundDrawable(combinedDrawable);
|
||||||
|
@ -999,7 +999,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati
|
||||||
break;
|
break;
|
||||||
case VIEW_TYPE_TEXT_INFO_CELL:
|
case VIEW_TYPE_TEXT_INFO_CELL:
|
||||||
view = new TextInfoPrivacyCell(context);
|
view = new TextInfoPrivacyCell(context);
|
||||||
Drawable drawable = Theme.getThemedDrawable(context, selectedContacts.size() == 0 ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
Drawable drawable = Theme.getThemedDrawableByKey(context, selectedContacts.size() == 0 ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
view.setBackgroundDrawable(combinedDrawable);
|
view.setBackgroundDrawable(combinedDrawable);
|
||||||
|
|
|
@ -271,7 +271,7 @@ public class GroupInviteActivity extends BaseFragment implements NotificationCen
|
||||||
TextInfoPrivacyCell privacyCell = (TextInfoPrivacyCell) holder.itemView;
|
TextInfoPrivacyCell privacyCell = (TextInfoPrivacyCell) holder.itemView;
|
||||||
if (position == shadowRow) {
|
if (position == shadowRow) {
|
||||||
privacyCell.setText("");
|
privacyCell.setText("");
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (position == linkInfoRow) {
|
} else if (position == linkInfoRow) {
|
||||||
TLRPC.Chat chat = getMessagesController().getChat(chatId);
|
TLRPC.Chat chat = getMessagesController().getChat(chatId);
|
||||||
if (ChatObject.isChannel(chat) && !chat.megagroup) {
|
if (ChatObject.isChannel(chat) && !chat.megagroup) {
|
||||||
|
@ -279,7 +279,7 @@ public class GroupInviteActivity extends BaseFragment implements NotificationCen
|
||||||
} else {
|
} else {
|
||||||
privacyCell.setText(LocaleController.getString("LinkInfo", R.string.LinkInfo));
|
privacyCell.setText(LocaleController.getString("LinkInfo", R.string.LinkInfo));
|
||||||
}
|
}
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
|
@ -549,7 +549,7 @@ public class GroupStickersActivity extends BaseFragment implements NotificationC
|
||||||
default:
|
default:
|
||||||
case TYPE_MY_STICKERS_HEADER:
|
case TYPE_MY_STICKERS_HEADER:
|
||||||
view = new HeaderCell(mContext, Theme.key_windowBackgroundWhiteGrayText4, 21, 0, 0, false, getResourceProvider());
|
view = new HeaderCell(mContext, Theme.key_windowBackgroundWhiteGrayText4, 21, 0, 0, false, getResourceProvider());
|
||||||
view.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
view.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
((HeaderCell) view).setText(LocaleController.getString(R.string.ChooseStickerMyStickerSets));
|
((HeaderCell) view).setText(LocaleController.getString(R.string.ChooseStickerMyStickerSets));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -685,7 +685,7 @@ public class GroupStickersActivity extends BaseFragment implements NotificationC
|
||||||
break;
|
break;
|
||||||
case TYPE_INFO:
|
case TYPE_INFO:
|
||||||
view = new TextInfoPrivacyCell(mContext);
|
view = new TextInfoPrivacyCell(mContext);
|
||||||
view.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
view.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
case TYPE_CHOOSE_HEADER:
|
case TYPE_CHOOSE_HEADER:
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class KeepMediaPopupView extends ActionBarPopupWindow.ActionBarPopupWindo
|
||||||
gap = new FrameLayout(context);
|
gap = new FrameLayout(context);
|
||||||
gap.setBackgroundColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuSeparator));
|
gap.setBackgroundColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuSeparator));
|
||||||
View gapShadow = new View(context);
|
View gapShadow = new View(context);
|
||||||
gapShadow.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow, null));
|
gapShadow.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow, null));
|
||||||
gap.addView(gapShadow, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
|
gap.addView(gapShadow, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
|
||||||
gap.setTag(R.id.fit_width_tag, 1);
|
gap.setTag(R.id.fit_width_tag, 1);
|
||||||
addView(gap, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 8));
|
addView(gap, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 8));
|
||||||
|
|
|
@ -10,7 +10,6 @@ package org.telegram.ui;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.SharedPreferences;
|
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -633,9 +632,9 @@ public class LanguageSelectActivity extends BaseFragment implements Notification
|
||||||
position--;
|
position--;
|
||||||
ShadowSectionCell sectionCell = (ShadowSectionCell) holder.itemView;
|
ShadowSectionCell sectionCell = (ShadowSectionCell) holder.itemView;
|
||||||
if (!unofficialLanguages.isEmpty() && position == unofficialLanguages.size()) {
|
if (!unofficialLanguages.isEmpty() && position == unofficialLanguages.size()) {
|
||||||
sectionCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
sectionCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
sectionCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
sectionCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -695,14 +694,14 @@ public class LanguageSelectActivity extends BaseFragment implements Notification
|
||||||
infoCell.updateRTL();
|
infoCell.updateRTL();
|
||||||
if (position == (!getMessagesController().premiumLocked && (getContextValue() || getChatValue()) ? 4 : 3)) {
|
if (position == (!getMessagesController().premiumLocked && (getContextValue() || getChatValue()) ? 4 : 3)) {
|
||||||
infoCell.setText(LocaleController.getString("TranslateMessagesInfo1", R.string.TranslateMessagesInfo1));
|
infoCell.setText(LocaleController.getString("TranslateMessagesInfo1", R.string.TranslateMessagesInfo1));
|
||||||
infoCell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
infoCell.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
infoCell.setTopPadding(11);
|
infoCell.setTopPadding(11);
|
||||||
infoCell.setBottomPadding(16);
|
infoCell.setBottomPadding(16);
|
||||||
} else {
|
} else {
|
||||||
infoCell.setTopPadding(0);
|
infoCell.setTopPadding(0);
|
||||||
infoCell.setBottomPadding(16);
|
infoCell.setBottomPadding(16);
|
||||||
infoCell.setText(LocaleController.getString("TranslateMessagesInfo2", R.string.TranslateMessagesInfo2));
|
infoCell.setText(LocaleController.getString("TranslateMessagesInfo2", R.string.TranslateMessagesInfo2));
|
||||||
infoCell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
infoCell.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -314,7 +314,7 @@ public class LinkEditActivity extends BaseFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
TextInfoPrivacyCell hintCell = new TextInfoPrivacyCell(context);
|
TextInfoPrivacyCell hintCell = new TextInfoPrivacyCell(context);
|
||||||
hintCell.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
hintCell.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
if (hasApproveCell) {
|
if (hasApproveCell) {
|
||||||
hintCell.setText(LocaleController.getString("ApproveNewMembersDescription", R.string.ApproveNewMembersDescription));
|
hintCell.setText(LocaleController.getString("ApproveNewMembersDescription", R.string.ApproveNewMembersDescription));
|
||||||
}
|
}
|
||||||
|
@ -450,7 +450,7 @@ public class LinkEditActivity extends BaseFragment {
|
||||||
linearLayout.addView(nameEditText, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50));
|
linearLayout.addView(nameEditText, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50));
|
||||||
|
|
||||||
dividerName = new TextInfoPrivacyCell(context);
|
dividerName = new TextInfoPrivacyCell(context);
|
||||||
dividerName.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
dividerName.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
dividerName.setText(LocaleController.getString("LinkNameHelp", R.string.LinkNameHelp));
|
dividerName.setText(LocaleController.getString("LinkNameHelp", R.string.LinkNameHelp));
|
||||||
linearLayout.addView(dividerName);
|
linearLayout.addView(dividerName);
|
||||||
|
|
||||||
|
@ -489,8 +489,8 @@ public class LinkEditActivity extends BaseFragment {
|
||||||
buttonTextView.setOnClickListener(this::onCreateClicked);
|
buttonTextView.setOnClickListener(this::onCreateClicked);
|
||||||
buttonTextView.setTextColor(Theme.getColor(Theme.key_featuredStickers_buttonText));
|
buttonTextView.setTextColor(Theme.getColor(Theme.key_featuredStickers_buttonText));
|
||||||
|
|
||||||
dividerUses.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
dividerUses.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
divider.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
divider.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
buttonTextView.setBackgroundDrawable(Theme.createSimpleSelectorRoundRectDrawable(AndroidUtilities.dp(6), Theme.getColor(Theme.key_featuredStickers_addButton), Theme.getColor(Theme.key_featuredStickers_addButtonPressed)));
|
buttonTextView.setBackgroundDrawable(Theme.createSimpleSelectorRoundRectDrawable(AndroidUtilities.dp(6), Theme.getColor(Theme.key_featuredStickers_addButton), Theme.getColor(Theme.key_featuredStickers_addButtonPressed)));
|
||||||
|
|
||||||
usesEditText.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
|
usesEditText.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
|
||||||
|
@ -792,7 +792,7 @@ public class LinkEditActivity extends BaseFragment {
|
||||||
usesChooseView.setVisibility(isVisible ? View.VISIBLE : View.GONE);
|
usesChooseView.setVisibility(isVisible ? View.VISIBLE : View.GONE);
|
||||||
usesEditText.setVisibility(isVisible ? View.VISIBLE : View.GONE);
|
usesEditText.setVisibility(isVisible ? View.VISIBLE : View.GONE);
|
||||||
dividerUses.setVisibility(isVisible ? View.VISIBLE : View.GONE);
|
dividerUses.setVisibility(isVisible ? View.VISIBLE : View.GONE);
|
||||||
divider.setBackground(Theme.getThemedDrawable(getParentActivity(), isVisible ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
divider.setBackground(Theme.getThemedDrawableByKey(getParentActivity(), isVisible ? R.drawable.greydivider : R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface Callback {
|
public interface Callback {
|
||||||
|
@ -818,8 +818,8 @@ public class LinkEditActivity extends BaseFragment {
|
||||||
ThemeDescription.ThemeDescriptionDelegate descriptionDelegate = () -> {
|
ThemeDescription.ThemeDescriptionDelegate descriptionDelegate = () -> {
|
||||||
if (dividerUses != null) {
|
if (dividerUses != null) {
|
||||||
Context context = dividerUses.getContext();
|
Context context = dividerUses.getContext();
|
||||||
dividerUses.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
dividerUses.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
divider.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
divider.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
buttonTextView.setBackgroundDrawable(Theme.createSimpleSelectorRoundRectDrawable(AndroidUtilities.dp(6), Theme.getColor(Theme.key_featuredStickers_addButton), Theme.getColor(Theme.key_featuredStickers_addButtonPressed)));
|
buttonTextView.setBackgroundDrawable(Theme.createSimpleSelectorRoundRectDrawable(AndroidUtilities.dp(6), Theme.getColor(Theme.key_featuredStickers_addButton), Theme.getColor(Theme.key_featuredStickers_addButtonPressed)));
|
||||||
|
|
||||||
usesEditText.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
|
usesEditText.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
|
||||||
|
@ -833,7 +833,7 @@ public class LinkEditActivity extends BaseFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
createTextView.setTextColor(Theme.getColor(Theme.key_actionBarDefaultTitle));
|
createTextView.setTextColor(Theme.getColor(Theme.key_actionBarDefaultTitle));
|
||||||
dividerName.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
dividerName.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
nameEditText.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
|
nameEditText.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
|
||||||
nameEditText.setHintTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText));
|
nameEditText.setHintTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText));
|
||||||
}
|
}
|
||||||
|
|
|
@ -391,11 +391,11 @@ public class LiteModeSettingsActivity extends BaseFragment {
|
||||||
boolean top = position > 0 && items.get(position - 1).viewType != VIEW_TYPE_INFO;
|
boolean top = position > 0 && items.get(position - 1).viewType != VIEW_TYPE_INFO;
|
||||||
boolean bottom = position + 1 < items.size() && items.get(position + 1).viewType != VIEW_TYPE_INFO;
|
boolean bottom = position + 1 < items.size() && items.get(position + 1).viewType != VIEW_TYPE_INFO;
|
||||||
if (top && bottom) {
|
if (top && bottom) {
|
||||||
textInfoPrivacyCell.setBackground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
textInfoPrivacyCell.setBackground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (top) {
|
} else if (top) {
|
||||||
textInfoPrivacyCell.setBackground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
textInfoPrivacyCell.setBackground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (bottom) {
|
} else if (bottom) {
|
||||||
textInfoPrivacyCell.setBackground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
textInfoPrivacyCell.setBackground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
textInfoPrivacyCell.setBackground(null);
|
textInfoPrivacyCell.setBackground(null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -275,7 +275,7 @@ public class LogoutActivity extends BaseFragment {
|
||||||
case 4:
|
case 4:
|
||||||
default: {
|
default: {
|
||||||
view = new TextInfoPrivacyCell(mContext);
|
view = new TextInfoPrivacyCell(mContext);
|
||||||
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -740,7 +740,7 @@ public class ManageLinksActivity extends BaseFragment {
|
||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
view = new HintInnerCell(mContext);
|
view = new HintInnerCell(mContext);
|
||||||
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundWhite));
|
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundWhite));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
view = new HeaderCell(mContext, 23);
|
view = new HeaderCell(mContext, 23);
|
||||||
|
@ -784,7 +784,7 @@ public class ManageLinksActivity extends BaseFragment {
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
view = new ShadowSectionCell(mContext);
|
view = new ShadowSectionCell(mContext);
|
||||||
view.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
view.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
TextSettingsCell revokeAll = new TextSettingsCell(mContext);
|
TextSettingsCell revokeAll = new TextSettingsCell(mContext);
|
||||||
|
@ -796,7 +796,7 @@ public class ManageLinksActivity extends BaseFragment {
|
||||||
case 9:
|
case 9:
|
||||||
TextInfoPrivacyCell cell = new TextInfoPrivacyCell(mContext);
|
TextInfoPrivacyCell cell = new TextInfoPrivacyCell(mContext);
|
||||||
cell.setText(LocaleController.getString("CreateNewLinkHelp", R.string.CreateNewLinkHelp));
|
cell.setText(LocaleController.getString("CreateNewLinkHelp", R.string.CreateNewLinkHelp));
|
||||||
cell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
cell.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
view = cell;
|
view = cell;
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
|
|
|
@ -777,7 +777,7 @@ public class MessageStatisticActivity extends BaseFragment implements Notificati
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
HeaderCell headerCell = (HeaderCell) holder.itemView;
|
HeaderCell headerCell = (HeaderCell) holder.itemView;
|
||||||
|
@ -970,7 +970,7 @@ public class MessageStatisticActivity extends BaseFragment implements Notificati
|
||||||
((StatisticActivity.BaseChartCell) child).recolor();
|
((StatisticActivity.BaseChartCell) child).recolor();
|
||||||
child.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
|
child.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
|
||||||
} else if (child instanceof ShadowSectionCell) {
|
} else if (child instanceof ShadowSectionCell) {
|
||||||
Drawable shadowDrawable = Theme.getThemedDrawable(ApplicationLoader.applicationContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
Drawable shadowDrawable = Theme.getThemedDrawableByKey(ApplicationLoader.applicationContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
||||||
Drawable background = new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray));
|
Drawable background = new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray));
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
|
|
|
@ -1301,9 +1301,9 @@ public class NotificationsCustomSettingsActivity extends BaseFragment implements
|
||||||
}
|
}
|
||||||
case 4: {
|
case 4: {
|
||||||
if (position == deleteAllSectionRow || position == groupSection2Row && exceptionsSection2Row == -1 || position == exceptionsSection2Row && deleteAllRow == -1) {
|
if (position == deleteAllSectionRow || position == groupSection2Row && exceptionsSection2Row == -1 || position == exceptionsSection2Row && deleteAllRow == -1) {
|
||||||
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -787,7 +787,7 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
|
||||||
case 6:
|
case 6:
|
||||||
default:
|
default:
|
||||||
view = new TextInfoPrivacyCell(mContext);
|
view = new TextInfoPrivacyCell(mContext);
|
||||||
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
view.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return new RecyclerListView.Holder(view);
|
return new RecyclerListView.Holder(view);
|
||||||
|
@ -912,9 +912,9 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
|
||||||
}
|
}
|
||||||
case 4: {
|
case 4: {
|
||||||
if (position == resetNotificationsSectionRow) {
|
if (position == resetNotificationsSectionRow) {
|
||||||
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -521,17 +521,23 @@ public class NotificationsSoundActivity extends BaseFragment implements ChatAtta
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
RingtoneManager manager = new RingtoneManager(ApplicationLoader.applicationContext);
|
try {
|
||||||
manager.setType(RingtoneManager.TYPE_NOTIFICATION);
|
RingtoneManager manager = new RingtoneManager(ApplicationLoader.applicationContext);
|
||||||
Cursor cursor = manager.getCursor();
|
manager.setType(RingtoneManager.TYPE_NOTIFICATION);
|
||||||
|
Cursor cursor = manager.getCursor();
|
||||||
|
|
||||||
while (cursor.moveToNext()) {
|
while (cursor.moveToNext()) {
|
||||||
String notificationTitle = cursor.getString(RingtoneManager.TITLE_COLUMN_INDEX);
|
String notificationTitle = cursor.getString(RingtoneManager.TITLE_COLUMN_INDEX);
|
||||||
String notificationUri = cursor.getString(RingtoneManager.URI_COLUMN_INDEX) + "/" + cursor.getString(RingtoneManager.ID_COLUMN_INDEX);
|
String notificationUri = cursor.getString(RingtoneManager.URI_COLUMN_INDEX) + "/" + cursor.getString(RingtoneManager.ID_COLUMN_INDEX);
|
||||||
|
|
||||||
if (title.equalsIgnoreCase(notificationTitle)) {
|
if (title.equalsIgnoreCase(notificationTitle)) {
|
||||||
return notificationUri;
|
return notificationUri;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Throwable e) {
|
||||||
|
// Exception java.lang.NullPointerException: Attempt to invoke interface method 'void android.database.Cursor.registerDataSetObserver(android.database.DataSetObserver)' on a null object reference
|
||||||
|
// ignore
|
||||||
|
FileLog.e(e);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1232,11 +1232,11 @@ public class PasscodeActivity extends BaseFragment implements NotificationCenter
|
||||||
cell.getTextView().setGravity(Gravity.CENTER_HORIZONTAL);
|
cell.getTextView().setGravity(Gravity.CENTER_HORIZONTAL);
|
||||||
} else if (position == autoLockDetailRow) {
|
} else if (position == autoLockDetailRow) {
|
||||||
cell.setText(LocaleController.getString(R.string.AutoLockInfo));
|
cell.setText(LocaleController.getString(R.string.AutoLockInfo));
|
||||||
cell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
cell.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
cell.getTextView().setGravity(LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT);
|
cell.getTextView().setGravity(LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT);
|
||||||
} else if (position == captureDetailRow) {
|
} else if (position == captureDetailRow) {
|
||||||
cell.setText(LocaleController.getString(R.string.ScreenCaptureInfo));
|
cell.setText(LocaleController.getString(R.string.ScreenCaptureInfo));
|
||||||
cell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
cell.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
cell.getTextView().setGravity(LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT);
|
cell.getTextView().setGravity(LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1494,7 +1494,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
bottomCell = new TextInfoPrivacyCell(context);
|
bottomCell = new TextInfoPrivacyCell(context);
|
||||||
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
bottomCell.setText(LocaleController.formatString("PassportEmailVerifyInfo", R.string.PassportEmailVerifyInfo, currentValues.get("email")));
|
bottomCell.setText(LocaleController.formatString("PassportEmailVerifyInfo", R.string.PassportEmailVerifyInfo, currentValues.get("email")));
|
||||||
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
}
|
}
|
||||||
|
@ -1620,7 +1620,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
passwordInfoRequestTextView = new TextInfoPrivacyCell(context);
|
passwordInfoRequestTextView = new TextInfoPrivacyCell(context);
|
||||||
passwordInfoRequestTextView.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
passwordInfoRequestTextView.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
passwordInfoRequestTextView.setText(LocaleController.formatString("PassportRequestPasswordInfo", R.string.PassportRequestPasswordInfo));
|
passwordInfoRequestTextView.setText(LocaleController.formatString("PassportRequestPasswordInfo", R.string.PassportRequestPasswordInfo));
|
||||||
linearLayout2.addView(passwordInfoRequestTextView, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(passwordInfoRequestTextView, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
|
||||||
|
@ -2007,7 +2007,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
avatarImageView.setForUserOrChat(botUser, avatarDrawable);
|
avatarImageView.setForUserOrChat(botUser, avatarDrawable);
|
||||||
|
|
||||||
bottomCell = new TextInfoPrivacyCell(context);
|
bottomCell = new TextInfoPrivacyCell(context);
|
||||||
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
||||||
bottomCell.setText(AndroidUtilities.replaceTags(LocaleController.formatString("PassportRequest", R.string.PassportRequest, UserObject.getFirstName(botUser))));
|
bottomCell.setText(AndroidUtilities.replaceTags(LocaleController.formatString("PassportRequest", R.string.PassportRequest, UserObject.getFirstName(botUser))));
|
||||||
bottomCell.getTextView().setGravity(Gravity.CENTER_HORIZONTAL);
|
bottomCell.getTextView().setGravity(Gravity.CENTER_HORIZONTAL);
|
||||||
((FrameLayout.LayoutParams) bottomCell.getTextView().getLayoutParams()).gravity = Gravity.CENTER_HORIZONTAL;
|
((FrameLayout.LayoutParams) bottomCell.getTextView().getLayoutParams()).gravity = Gravity.CENTER_HORIZONTAL;
|
||||||
|
@ -2156,7 +2156,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
|
|
||||||
if (botUser != null) {
|
if (botUser != null) {
|
||||||
bottomCell = new TextInfoPrivacyCell(context);
|
bottomCell = new TextInfoPrivacyCell(context);
|
||||||
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
bottomCell.setLinkTextColorKey(Theme.key_windowBackgroundWhiteGrayText4);
|
bottomCell.setLinkTextColorKey(Theme.key_windowBackgroundWhiteGrayText4);
|
||||||
if (!TextUtils.isEmpty(currentForm.privacy_policy_url)) {
|
if (!TextUtils.isEmpty(currentForm.privacy_policy_url)) {
|
||||||
String str2 = LocaleController.formatString("PassportPolicy", R.string.PassportPolicy, UserObject.getFirstName(botUser), botUser.username);
|
String str2 = LocaleController.formatString("PassportPolicy", R.string.PassportPolicy, UserObject.getFirstName(botUser), botUser.username);
|
||||||
|
@ -2431,7 +2431,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
linearLayout2.addView(headerCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(headerCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
|
||||||
sectionCell = new ShadowSectionCell(context);
|
sectionCell = new ShadowSectionCell(context);
|
||||||
sectionCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
sectionCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
linearLayout2.addView(sectionCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(sectionCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
|
||||||
addDocumentCell = new TextSettingsCell(context);
|
addDocumentCell = new TextSettingsCell(context);
|
||||||
|
@ -2480,13 +2480,13 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
});
|
});
|
||||||
|
|
||||||
addDocumentSectionCell = new ShadowSectionCell(context);
|
addDocumentSectionCell = new ShadowSectionCell(context);
|
||||||
addDocumentSectionCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
addDocumentSectionCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
linearLayout2.addView(addDocumentSectionCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(addDocumentSectionCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
|
||||||
emptyLayout = new LinearLayout(context);
|
emptyLayout = new LinearLayout(context);
|
||||||
emptyLayout.setOrientation(LinearLayout.VERTICAL);
|
emptyLayout.setOrientation(LinearLayout.VERTICAL);
|
||||||
emptyLayout.setGravity(Gravity.CENTER);
|
emptyLayout.setGravity(Gravity.CENTER);
|
||||||
emptyLayout.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
emptyLayout.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
if (AndroidUtilities.isTablet()) {
|
if (AndroidUtilities.isTablet()) {
|
||||||
linearLayout2.addView(emptyLayout, new LinearLayout.LayoutParams(LayoutHelper.MATCH_PARENT, AndroidUtilities.dp(528) - ActionBar.getCurrentActionBarHeight()));
|
linearLayout2.addView(emptyLayout, new LinearLayout.LayoutParams(LayoutHelper.MATCH_PARENT, AndroidUtilities.dp(528) - ActionBar.getCurrentActionBarHeight()));
|
||||||
} else {
|
} else {
|
||||||
|
@ -2733,7 +2733,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
});
|
});
|
||||||
|
|
||||||
bottomCell = new TextInfoPrivacyCell(context);
|
bottomCell = new TextInfoPrivacyCell(context);
|
||||||
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
bottomCell.setText(LocaleController.getString("PassportPhoneUseSameEmailInfo", R.string.PassportPhoneUseSameEmailInfo));
|
bottomCell.setText(LocaleController.getString("PassportPhoneUseSameEmailInfo", R.string.PassportPhoneUseSameEmailInfo));
|
||||||
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
}
|
}
|
||||||
|
@ -2777,7 +2777,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
bottomCell = new TextInfoPrivacyCell(context);
|
bottomCell = new TextInfoPrivacyCell(context);
|
||||||
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
bottomCell.setText(LocaleController.getString("PassportEmailUploadInfo", R.string.PassportEmailUploadInfo));
|
bottomCell.setText(LocaleController.getString("PassportEmailUploadInfo", R.string.PassportEmailUploadInfo));
|
||||||
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
}
|
}
|
||||||
|
@ -2819,7 +2819,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
});
|
});
|
||||||
|
|
||||||
bottomCell = new TextInfoPrivacyCell(context);
|
bottomCell = new TextInfoPrivacyCell(context);
|
||||||
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
bottomCell.setText(LocaleController.getString("PassportPhoneUseSameInfo", R.string.PassportPhoneUseSameInfo));
|
bottomCell.setText(LocaleController.getString("PassportPhoneUseSameInfo", R.string.PassportPhoneUseSameInfo));
|
||||||
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
|
||||||
|
@ -3123,7 +3123,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
bottomCell = new TextInfoPrivacyCell(context);
|
bottomCell = new TextInfoPrivacyCell(context);
|
||||||
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
bottomCell.setText(LocaleController.getString("PassportPhoneUploadInfo", R.string.PassportPhoneUploadInfo));
|
bottomCell.setText(LocaleController.getString("PassportPhoneUploadInfo", R.string.PassportPhoneUploadInfo));
|
||||||
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
}
|
}
|
||||||
|
@ -3143,7 +3143,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
topErrorCell = new TextInfoPrivacyCell(context);
|
topErrorCell = new TextInfoPrivacyCell(context);
|
||||||
topErrorCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
topErrorCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
||||||
topErrorCell.setPadding(0, AndroidUtilities.dp(7), 0, 0);
|
topErrorCell.setPadding(0, AndroidUtilities.dp(7), 0, 0);
|
||||||
linearLayout2.addView(topErrorCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(topErrorCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
checkTopErrorCell(true);
|
checkTopErrorCell(true);
|
||||||
|
@ -3179,7 +3179,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
});
|
});
|
||||||
|
|
||||||
bottomCell = new TextInfoPrivacyCell(context);
|
bottomCell = new TextInfoPrivacyCell(context);
|
||||||
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
|
|
||||||
if (currentBotId != 0) {
|
if (currentBotId != 0) {
|
||||||
noAllDocumentsErrorText = LocaleController.getString("PassportAddAddressUploadInfo", R.string.PassportAddAddressUploadInfo);
|
noAllDocumentsErrorText = LocaleController.getString("PassportAddAddressUploadInfo", R.string.PassportAddAddressUploadInfo);
|
||||||
|
@ -3233,7 +3233,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
});
|
});
|
||||||
|
|
||||||
bottomCellTranslation = new TextInfoPrivacyCell(context);
|
bottomCellTranslation = new TextInfoPrivacyCell(context);
|
||||||
bottomCellTranslation.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
bottomCellTranslation.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
|
|
||||||
if (currentBotId != 0) {
|
if (currentBotId != 0) {
|
||||||
noAllTranslationErrorText = LocaleController.getString("PassportAddTranslationUploadInfo", R.string.PassportAddTranslationUploadInfo);
|
noAllTranslationErrorText = LocaleController.getString("PassportAddTranslationUploadInfo", R.string.PassportAddTranslationUploadInfo);
|
||||||
|
@ -3502,7 +3502,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
addDocumentViews(currentDocumentsTypeValue.files);
|
addDocumentViews(currentDocumentsTypeValue.files);
|
||||||
addTranslationDocumentViews(currentDocumentsTypeValue.translation);
|
addTranslationDocumentViews(currentDocumentsTypeValue.translation);
|
||||||
}
|
}
|
||||||
sectionCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
sectionCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
|
|
||||||
TextSettingsCell settingsCell1 = new TextSettingsCell(context);
|
TextSettingsCell settingsCell1 = new TextSettingsCell(context);
|
||||||
settingsCell1.setTextColor(Theme.getColor(Theme.key_text_RedRegular));
|
settingsCell1.setTextColor(Theme.getColor(Theme.key_text_RedRegular));
|
||||||
|
@ -3516,12 +3516,12 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
settingsCell1.setOnClickListener(v -> createDocumentDeleteAlert());
|
settingsCell1.setOnClickListener(v -> createDocumentDeleteAlert());
|
||||||
|
|
||||||
sectionCell = new ShadowSectionCell(context);
|
sectionCell = new ShadowSectionCell(context);
|
||||||
sectionCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
sectionCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
linearLayout2.addView(sectionCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(sectionCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
} else {
|
} else {
|
||||||
sectionCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
sectionCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
if (documentOnly && currentDocumentsType != null) {
|
if (documentOnly && currentDocumentsType != null) {
|
||||||
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateUploadText(UPLOADING_TYPE_DOCUMENTS);
|
updateUploadText(UPLOADING_TYPE_DOCUMENTS);
|
||||||
|
@ -3884,7 +3884,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
topErrorCell = new TextInfoPrivacyCell(context);
|
topErrorCell = new TextInfoPrivacyCell(context);
|
||||||
topErrorCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
topErrorCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
||||||
topErrorCell.setPadding(0, AndroidUtilities.dp(7), 0, 0);
|
topErrorCell.setPadding(0, AndroidUtilities.dp(7), 0, 0);
|
||||||
linearLayout2.addView(topErrorCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(topErrorCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
checkTopErrorCell(true);
|
checkTopErrorCell(true);
|
||||||
|
@ -3942,7 +3942,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
bottomCell = new TextInfoPrivacyCell(context);
|
bottomCell = new TextInfoPrivacyCell(context);
|
||||||
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
bottomCell.setText(LocaleController.getString("PassportPersonalUploadInfo", R.string.PassportPersonalUploadInfo));
|
bottomCell.setText(LocaleController.getString("PassportPersonalUploadInfo", R.string.PassportPersonalUploadInfo));
|
||||||
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
|
||||||
|
@ -3965,7 +3965,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
});
|
});
|
||||||
|
|
||||||
bottomCellTranslation = new TextInfoPrivacyCell(context);
|
bottomCellTranslation = new TextInfoPrivacyCell(context);
|
||||||
bottomCellTranslation.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
bottomCellTranslation.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
|
|
||||||
if (currentBotId != 0) {
|
if (currentBotId != 0) {
|
||||||
noAllTranslationErrorText = LocaleController.getString("PassportAddTranslationUploadInfo", R.string.PassportAddTranslationUploadInfo);
|
noAllTranslationErrorText = LocaleController.getString("PassportAddTranslationUploadInfo", R.string.PassportAddTranslationUploadInfo);
|
||||||
|
@ -4056,7 +4056,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
});
|
});
|
||||||
|
|
||||||
bottomCell = new TextInfoPrivacyCell(context);
|
bottomCell = new TextInfoPrivacyCell(context);
|
||||||
bottomCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
bottomCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
bottomCell.setText(LocaleController.getString("PassportScanPassportInfo", R.string.PassportScanPassportInfo));
|
bottomCell.setText(LocaleController.getString("PassportScanPassportInfo", R.string.PassportScanPassportInfo));
|
||||||
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(bottomCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
}
|
}
|
||||||
|
@ -4590,13 +4590,13 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
linearLayout2.addView(settingsCell1, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(settingsCell1, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
settingsCell1.setOnClickListener(v -> createDocumentDeleteAlert());
|
settingsCell1.setOnClickListener(v -> createDocumentDeleteAlert());
|
||||||
|
|
||||||
nativeInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
nativeInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
|
|
||||||
sectionCell = new ShadowSectionCell(context);
|
sectionCell = new ShadowSectionCell(context);
|
||||||
sectionCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
sectionCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
linearLayout2.addView(sectionCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(sectionCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
} else {
|
} else {
|
||||||
nativeInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
nativeInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
|
|
||||||
updateInterfaceStringsForDocumentType();
|
updateInterfaceStringsForDocumentType();
|
||||||
|
@ -5301,9 +5301,9 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((currentBotId != 0 || currentDocumentsType == null) && currentTypeValue != null && !documentOnly || currentDocumentsTypeValue != null) {
|
if ((currentBotId != 0 || currentDocumentsType == null) && currentTypeValue != null && !documentOnly || currentDocumentsTypeValue != null) {
|
||||||
sectionCell2.setBackgroundDrawable(Theme.getThemedDrawable(getParentActivity(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
sectionCell2.setBackgroundDrawable(Theme.getThemedDrawableByKey(getParentActivity(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
sectionCell2.setBackgroundDrawable(Theme.getThemedDrawable(getParentActivity(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
sectionCell2.setBackgroundDrawable(Theme.getThemedDrawableByKey(getParentActivity(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -5324,7 +5324,7 @@ public class PassportActivity extends BaseFragment implements NotificationCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sectionCell2.setBackgroundDrawable(Theme.getThemedDrawable(getParentActivity(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
sectionCell2.setBackgroundDrawable(Theme.getThemedDrawableByKey(getParentActivity(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
|
|
||||||
nativeInfoCell.setText(LocaleController.formatString("PassportNativeInfo", R.string.PassportNativeInfo, country));
|
nativeInfoCell.setText(LocaleController.formatString("PassportNativeInfo", R.string.PassportNativeInfo, country));
|
||||||
|
|
|
@ -1007,7 +1007,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
|
||||||
}
|
}
|
||||||
|
|
||||||
bottomCell[1] = new TextInfoPrivacyCell(context, resourcesProvider);
|
bottomCell[1] = new TextInfoPrivacyCell(context, resourcesProvider);
|
||||||
bottomCell[1].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
bottomCell[1].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
linearLayout2.addView(bottomCell[1], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(bottomCell[1], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
if (paymentForm.invoice.email_to_provider && paymentForm.invoice.phone_to_provider) {
|
if (paymentForm.invoice.email_to_provider && paymentForm.invoice.phone_to_provider) {
|
||||||
bottomCell[1].setText(LocaleController.formatString("PaymentPhoneEmailToProvider", R.string.PaymentPhoneEmailToProvider, providerName));
|
bottomCell[1].setText(LocaleController.formatString("PaymentPhoneEmailToProvider", R.string.PaymentPhoneEmailToProvider, providerName));
|
||||||
|
@ -1031,7 +1031,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
|
||||||
});
|
});
|
||||||
|
|
||||||
bottomCell[0] = new TextInfoPrivacyCell(context, resourcesProvider);
|
bottomCell[0] = new TextInfoPrivacyCell(context, resourcesProvider);
|
||||||
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
bottomCell[0].setText(LocaleController.getString("PaymentShippingSaveInfo", R.string.PaymentShippingSaveInfo));
|
bottomCell[0].setText(LocaleController.getString("PaymentShippingSaveInfo", R.string.PaymentShippingSaveInfo));
|
||||||
linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
}
|
}
|
||||||
|
@ -1187,7 +1187,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
|
||||||
});
|
});
|
||||||
|
|
||||||
bottomCell[0] = new TextInfoPrivacyCell(context, resourcesProvider);
|
bottomCell[0] = new TextInfoPrivacyCell(context, resourcesProvider);
|
||||||
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
updateSavePaymentField();
|
updateSavePaymentField();
|
||||||
linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
} else {
|
} else {
|
||||||
|
@ -1627,7 +1627,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
|
||||||
});
|
});
|
||||||
|
|
||||||
bottomCell[0] = new TextInfoPrivacyCell(context, resourcesProvider);
|
bottomCell[0] = new TextInfoPrivacyCell(context, resourcesProvider);
|
||||||
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
updateSavePaymentField();
|
updateSavePaymentField();
|
||||||
linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
} else if (a == FIELD_CARD) {
|
} else if (a == FIELD_CARD) {
|
||||||
|
@ -1679,7 +1679,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
|
||||||
linearLayout2.addView(radioCells[a]);
|
linearLayout2.addView(radioCells[a]);
|
||||||
}
|
}
|
||||||
bottomCell[0] = new TextInfoPrivacyCell(context, resourcesProvider);
|
bottomCell[0] = new TextInfoPrivacyCell(context, resourcesProvider);
|
||||||
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
} else if (currentStep == STEP_CONFIRM_PASSWORD) {
|
} else if (currentStep == STEP_CONFIRM_PASSWORD) {
|
||||||
inputFields = new EditTextBoldCursor[FIELDS_COUNT_SAVEDCARD];
|
inputFields = new EditTextBoldCursor[FIELDS_COUNT_SAVEDCARD];
|
||||||
|
@ -1757,7 +1757,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
|
||||||
if (a == FIELD_SAVEDPASSWORD) {
|
if (a == FIELD_SAVEDPASSWORD) {
|
||||||
bottomCell[0] = new TextInfoPrivacyCell(context, resourcesProvider);
|
bottomCell[0] = new TextInfoPrivacyCell(context, resourcesProvider);
|
||||||
bottomCell[0].setText(LocaleController.formatString("PaymentConfirmationMessage", R.string.PaymentConfirmationMessage, savedCredentialsCard.title));
|
bottomCell[0].setText(LocaleController.formatString("PaymentConfirmationMessage", R.string.PaymentConfirmationMessage, savedCredentialsCard.title));
|
||||||
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
|
||||||
settingsCell[0] = new TextSettingsCell(context, resourcesProvider);
|
settingsCell[0] = new TextSettingsCell(context, resourcesProvider);
|
||||||
|
@ -1770,7 +1770,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
|
||||||
});
|
});
|
||||||
|
|
||||||
bottomCell[1] = new TextInfoPrivacyCell(context, resourcesProvider);
|
bottomCell[1] = new TextInfoPrivacyCell(context, resourcesProvider);
|
||||||
bottomCell[1].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
bottomCell[1].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
linearLayout2.addView(bottomCell[1], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(bottomCell[1], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2092,7 +2092,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
|
||||||
linearLayout2.addView(totalCell);
|
linearLayout2.addView(totalCell);
|
||||||
|
|
||||||
sectionCell[2] = new ShadowSectionCell(context, resourcesProvider);
|
sectionCell[2] = new ShadowSectionCell(context, resourcesProvider);
|
||||||
sectionCell[2].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
sectionCell[2].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
linearLayout2.addView(sectionCell[2], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(sectionCell[2], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
|
||||||
detailSettingsCell[0] = new TextDetailSettingsCell(context);
|
detailSettingsCell[0] = new TextDetailSettingsCell(context);
|
||||||
|
@ -2436,7 +2436,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
|
||||||
}
|
}
|
||||||
|
|
||||||
sectionCell[1] = new ShadowSectionCell(context, resourcesProvider);
|
sectionCell[1] = new ShadowSectionCell(context, resourcesProvider);
|
||||||
sectionCell[1].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
sectionCell[1].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
if (cardInfoVisibility != View.VISIBLE && currentStep == STEP_CHECKOUT && validateRequest == null && (paymentForm == null || paymentForm.saved_info == null)) {
|
if (cardInfoVisibility != View.VISIBLE && currentStep == STEP_CHECKOUT && validateRequest == null && (paymentForm == null || paymentForm.saved_info == null)) {
|
||||||
sectionCell[1].setVisibility(cardInfoVisibility);
|
sectionCell[1].setVisibility(cardInfoVisibility);
|
||||||
}
|
}
|
||||||
|
@ -2476,7 +2476,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
|
||||||
linearLayout2.addView(codeFieldCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(codeFieldCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
|
||||||
bottomCell[2] = new TextInfoPrivacyCell(context, resourcesProvider);
|
bottomCell[2] = new TextInfoPrivacyCell(context, resourcesProvider);
|
||||||
bottomCell[2].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
bottomCell[2].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
linearLayout2.addView(bottomCell[2], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(bottomCell[2], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
|
||||||
settingsCell[1] = new TextSettingsCell(context, resourcesProvider);
|
settingsCell[1] = new TextSettingsCell(context, resourcesProvider);
|
||||||
|
@ -2605,12 +2605,12 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
|
||||||
if (a == FIELD_REENTERPASSWORD) {
|
if (a == FIELD_REENTERPASSWORD) {
|
||||||
bottomCell[0] = new TextInfoPrivacyCell(context, resourcesProvider);
|
bottomCell[0] = new TextInfoPrivacyCell(context, resourcesProvider);
|
||||||
bottomCell[0].setText(LocaleController.getString("PaymentPasswordInfo", R.string.PaymentPasswordInfo));
|
bottomCell[0].setText(LocaleController.getString("PaymentPasswordInfo", R.string.PaymentPasswordInfo));
|
||||||
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
bottomCell[0].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(bottomCell[0], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
} else if (a == FIELD_ENTERPASSWORDEMAIL) {
|
} else if (a == FIELD_ENTERPASSWORDEMAIL) {
|
||||||
bottomCell[1] = new TextInfoPrivacyCell(context, resourcesProvider);
|
bottomCell[1] = new TextInfoPrivacyCell(context, resourcesProvider);
|
||||||
bottomCell[1].setText(LocaleController.getString("PaymentPasswordEmailInfo", R.string.PaymentPasswordEmailInfo));
|
bottomCell[1].setText(LocaleController.getString("PaymentPasswordEmailInfo", R.string.PaymentPasswordEmailInfo));
|
||||||
bottomCell[1].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
bottomCell[1].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
linearLayout2.addView(bottomCell[1], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(bottomCell[1], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3432,11 +3432,11 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen
|
||||||
bottomCell[0].setText(text);
|
bottomCell[0].setText(text);
|
||||||
checkCell1.setVisibility(View.VISIBLE);
|
checkCell1.setVisibility(View.VISIBLE);
|
||||||
bottomCell[0].setVisibility(View.VISIBLE);
|
bottomCell[0].setVisibility(View.VISIBLE);
|
||||||
sectionCell[2].setBackgroundDrawable(Theme.getThemedDrawable(sectionCell[2].getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
sectionCell[2].setBackgroundDrawable(Theme.getThemedDrawableByKey(sectionCell[2].getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
checkCell1.setVisibility(View.GONE);
|
checkCell1.setVisibility(View.GONE);
|
||||||
bottomCell[0].setVisibility(View.GONE);
|
bottomCell[0].setVisibility(View.GONE);
|
||||||
sectionCell[2].setBackgroundDrawable(Theme.getThemedDrawable(sectionCell[2].getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
sectionCell[2].setBackgroundDrawable(Theme.getThemedDrawableByKey(sectionCell[2].getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -995,11 +995,11 @@ public class PeopleNearbyActivity extends BaseFragment implements NotificationCe
|
||||||
case 1:
|
case 1:
|
||||||
ShadowSectionCell privacyCell = (ShadowSectionCell) holder.itemView;
|
ShadowSectionCell privacyCell = (ShadowSectionCell) holder.itemView;
|
||||||
if (position == usersSectionRow) {
|
if (position == usersSectionRow) {
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (position == chatsSectionRow) {
|
} else if (position == chatsSectionRow) {
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (position == helpSectionRow) {
|
} else if (position == helpSectionRow) {
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
|
@ -587,7 +587,7 @@ public class PollCreateActivity extends BaseFragment {
|
||||||
case 2: {
|
case 2: {
|
||||||
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
|
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
|
||||||
cell.setFixedSize(0);
|
cell.setFixedSize(0);
|
||||||
cell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
cell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
if (position == solutionInfoRow) {
|
if (position == solutionInfoRow) {
|
||||||
cell.setText(LocaleController.getString("AddAnExplanationInfo", R.string.AddAnExplanationInfo));
|
cell.setText(LocaleController.getString("AddAnExplanationInfo", R.string.AddAnExplanationInfo));
|
||||||
} else if (position == settingsSectionRow) {
|
} else if (position == settingsSectionRow) {
|
||||||
|
|
|
@ -257,7 +257,7 @@ public class PrivacyControlActivity extends BaseFragment implements Notification
|
||||||
setWillNotDraw(false);
|
setWillNotDraw(false);
|
||||||
setClipToPadding(false);
|
setClipToPadding(false);
|
||||||
|
|
||||||
shadowDrawable = Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
|
shadowDrawable = Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
|
||||||
setPadding(0, AndroidUtilities.dp(11), 0, AndroidUtilities.dp(11));
|
setPadding(0, AndroidUtilities.dp(11), 0, AndroidUtilities.dp(11));
|
||||||
|
|
||||||
int date = (int) (System.currentTimeMillis() / 1000) - 60 * 60;
|
int date = (int) (System.currentTimeMillis() / 1000) - 60 * 60;
|
||||||
|
@ -1141,7 +1141,7 @@ public class PrivacyControlActivity extends BaseFragment implements Notification
|
||||||
case 5:
|
case 5:
|
||||||
default:
|
default:
|
||||||
view = new ShadowSectionCell(mContext);
|
view = new ShadowSectionCell(mContext);
|
||||||
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
Drawable drawable = Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
view.setBackgroundDrawable(combinedDrawable);
|
view.setBackgroundDrawable(combinedDrawable);
|
||||||
|
@ -1335,7 +1335,7 @@ public class PrivacyControlActivity extends BaseFragment implements Notification
|
||||||
privacyCell.setText(LocaleController.getString("PhotoForRestDescription", R.string.PhotoForRestDescription));
|
privacyCell.setText(LocaleController.getString("PhotoForRestDescription", R.string.PhotoForRestDescription));
|
||||||
}
|
}
|
||||||
if (backgroundResId != 0) {
|
if (backgroundResId != 0) {
|
||||||
Drawable drawable = Theme.getThemedDrawable(mContext, backgroundResId, Theme.key_windowBackgroundGrayShadow);
|
Drawable drawable = Theme.getThemedDrawableByKey(mContext, backgroundResId, Theme.key_windowBackgroundGrayShadow);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
privacyCell.setBackgroundDrawable(combinedDrawable);
|
privacyCell.setBackgroundDrawable(combinedDrawable);
|
||||||
|
|
|
@ -1022,7 +1022,7 @@ public class PrivacySettingsActivity extends BaseFragment implements Notificatio
|
||||||
case 1:
|
case 1:
|
||||||
TextInfoPrivacyCell privacyCell = (TextInfoPrivacyCell) holder.itemView;
|
TextInfoPrivacyCell privacyCell = (TextInfoPrivacyCell) holder.itemView;
|
||||||
boolean last = position == getItemCount() - 1;
|
boolean last = position == getItemCount() - 1;
|
||||||
privacyCell.setBackground(Theme.getThemedDrawable(mContext, last ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackground(Theme.getThemedDrawableByKey(mContext, last ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
if (position == deleteAccountDetailRow) {
|
if (position == deleteAccountDetailRow) {
|
||||||
privacyCell.setText(LocaleController.getString("DeleteAccountHelp", R.string.DeleteAccountHelp));
|
privacyCell.setText(LocaleController.getString("DeleteAccountHelp", R.string.DeleteAccountHelp));
|
||||||
} else if (position == groupsDetailRow) {
|
} else if (position == groupsDetailRow) {
|
||||||
|
|
|
@ -494,14 +494,14 @@ public class PrivacyUsersActivity extends BaseFragment implements NotificationCe
|
||||||
privacyCell.setText(null);
|
privacyCell.setText(null);
|
||||||
}
|
}
|
||||||
if (usersStartRow == -1) {
|
if (usersStartRow == -1) {
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
} else if (position == usersDetailRow) {
|
} else if (position == usersDetailRow) {
|
||||||
privacyCell.setFixedSize(12);
|
privacyCell.setFixedSize(12);
|
||||||
privacyCell.setText("");
|
privacyCell.setText("");
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
|
@ -815,20 +815,20 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
|
||||||
TextInfoPrivacyCell textCell = (TextInfoPrivacyCell) holder.itemView;
|
TextInfoPrivacyCell textCell = (TextInfoPrivacyCell) holder.itemView;
|
||||||
if (position == popupInfoRow) {
|
if (position == popupInfoRow) {
|
||||||
textCell.setText(LocaleController.getString("ProfilePopupNotificationInfo", R.string.ProfilePopupNotificationInfo));
|
textCell.setText(LocaleController.getString("ProfilePopupNotificationInfo", R.string.ProfilePopupNotificationInfo));
|
||||||
textCell.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
textCell.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (position == ledInfoRow) {
|
} else if (position == ledInfoRow) {
|
||||||
textCell.setText(LocaleController.getString("NotificationsLedInfo", R.string.NotificationsLedInfo));
|
textCell.setText(LocaleController.getString("NotificationsLedInfo", R.string.NotificationsLedInfo));
|
||||||
textCell.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
textCell.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (position == priorityInfoRow) {
|
} else if (position == priorityInfoRow) {
|
||||||
if (priorityRow == -1) {
|
if (priorityRow == -1) {
|
||||||
textCell.setText("");
|
textCell.setText("");
|
||||||
} else {
|
} else {
|
||||||
textCell.setText(LocaleController.getString("PriorityInfo", R.string.PriorityInfo));
|
textCell.setText(LocaleController.getString("PriorityInfo", R.string.PriorityInfo));
|
||||||
}
|
}
|
||||||
textCell.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
textCell.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (position == ringtoneInfoRow) {
|
} else if (position == ringtoneInfoRow) {
|
||||||
textCell.setText(LocaleController.getString("VoipRingtoneInfo", R.string.VoipRingtoneInfo));
|
textCell.setText(LocaleController.getString("VoipRingtoneInfo", R.string.VoipRingtoneInfo));
|
||||||
textCell.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
textCell.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -881,9 +881,9 @@ public class ProxyListActivity extends BaseFragment implements NotificationCente
|
||||||
switch (holder.getItemViewType()) {
|
switch (holder.getItemViewType()) {
|
||||||
case VIEW_TYPE_SHADOW: {
|
case VIEW_TYPE_SHADOW: {
|
||||||
if (position == proxyShadowRow && callsRow == -1) {
|
if (position == proxyShadowRow && callsRow == -1) {
|
||||||
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -920,10 +920,10 @@ public class ProxyListActivity extends BaseFragment implements NotificationCente
|
||||||
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
|
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
|
||||||
if (position == callsDetailRow) {
|
if (position == callsDetailRow) {
|
||||||
cell.setText(LocaleController.getString("UseProxyForCallsInfo", R.string.UseProxyForCallsInfo));
|
cell.setText(LocaleController.getString("UseProxyForCallsInfo", R.string.UseProxyForCallsInfo));
|
||||||
cell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
cell.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (position == rotationTimeoutInfoRow) {
|
} else if (position == rotationTimeoutInfoRow) {
|
||||||
cell.setText(LocaleController.getString(R.string.ProxyRotationTimeoutInfo));
|
cell.setText(LocaleController.getString(R.string.ProxyRotationTimeoutInfo));
|
||||||
cell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
cell.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1023,7 +1023,7 @@ public class ProxyListActivity extends BaseFragment implements NotificationCente
|
||||||
break;
|
break;
|
||||||
case VIEW_TYPE_INFO:
|
case VIEW_TYPE_INFO:
|
||||||
view = new TextInfoPrivacyCell(mContext);
|
view = new TextInfoPrivacyCell(mContext);
|
||||||
view.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
view.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
case VIEW_TYPE_SLIDE_CHOOSER:
|
case VIEW_TYPE_SLIDE_CHOOSER:
|
||||||
view = new SlideChooseView(mContext);
|
view = new SlideChooseView(mContext);
|
||||||
|
|
|
@ -436,7 +436,7 @@ public class ProxySettingsActivity extends BaseFragment {
|
||||||
|
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
bottomCells[i] = new TextInfoPrivacyCell(context);
|
bottomCells[i] = new TextInfoPrivacyCell(context);
|
||||||
bottomCells[i].setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
bottomCells[i].setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
bottomCells[i].setText(LocaleController.getString("UseProxyInfo", R.string.UseProxyInfo));
|
bottomCells[i].setText(LocaleController.getString("UseProxyInfo", R.string.UseProxyInfo));
|
||||||
} else {
|
} else {
|
||||||
|
@ -487,7 +487,7 @@ public class ProxySettingsActivity extends BaseFragment {
|
||||||
linearLayout2.addView(pasteCell, 0, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(pasteCell, 0, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
pasteCell.setVisibility(View.GONE);
|
pasteCell.setVisibility(View.GONE);
|
||||||
sectionCell[2] = new ShadowSectionCell(fragmentView.getContext());
|
sectionCell[2] = new ShadowSectionCell(fragmentView.getContext());
|
||||||
sectionCell[2].setBackground(Theme.getThemedDrawable(fragmentView.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
sectionCell[2].setBackground(Theme.getThemedDrawableByKey(fragmentView.getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
linearLayout2.addView(sectionCell[2], 1, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(sectionCell[2], 1, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
sectionCell[2].setVisibility(View.GONE);
|
sectionCell[2].setVisibility(View.GONE);
|
||||||
|
|
||||||
|
@ -549,7 +549,7 @@ public class ProxySettingsActivity extends BaseFragment {
|
||||||
});
|
});
|
||||||
|
|
||||||
sectionCell[1] = new ShadowSectionCell(context);
|
sectionCell[1] = new ShadowSectionCell(context);
|
||||||
sectionCell[1].setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
sectionCell[1].setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
linearLayout2.addView(sectionCell[1], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout2.addView(sectionCell[1], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
|
||||||
clipboardManager = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
|
clipboardManager = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||||
|
|
|
@ -138,7 +138,7 @@ public class QuickRepliesSettingsActivity extends BaseFragment {
|
||||||
switch (holder.getItemViewType()) {
|
switch (holder.getItemViewType()) {
|
||||||
case 0: {
|
case 0: {
|
||||||
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
|
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
|
||||||
cell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
cell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
cell.setText(LocaleController.getString("VoipQuickRepliesExplain", R.string.VoipQuickRepliesExplain));
|
cell.setText(LocaleController.getString("VoipQuickRepliesExplain", R.string.VoipQuickRepliesExplain));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ public class ReactionsDoubleTapManageActivity extends BaseFragment implements No
|
||||||
case 2:
|
case 2:
|
||||||
TextInfoPrivacyCell cell = new TextInfoPrivacyCell(context);
|
TextInfoPrivacyCell cell = new TextInfoPrivacyCell(context);
|
||||||
cell.setText(LocaleController.getString("DoubleTapPreviewRational", R.string.DoubleTapPreviewRational));
|
cell.setText(LocaleController.getString("DoubleTapPreviewRational", R.string.DoubleTapPreviewRational));
|
||||||
cell.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
cell.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
view = cell;
|
view = cell;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
@ -125,7 +125,7 @@ public class ReactionsDoubleTapManageActivity extends BaseFragment implements No
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
view.setBackground(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
view.setBackground(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
case 1: {
|
case 1: {
|
||||||
|
|
|
@ -27,7 +27,6 @@ import com.google.common.collect.Sets;
|
||||||
|
|
||||||
import org.telegram.messenger.AndroidUtilities;
|
import org.telegram.messenger.AndroidUtilities;
|
||||||
import org.telegram.messenger.ApplicationLoader;
|
import org.telegram.messenger.ApplicationLoader;
|
||||||
import org.telegram.messenger.BotWebViewVibrationEffect;
|
|
||||||
import org.telegram.messenger.FileLog;
|
import org.telegram.messenger.FileLog;
|
||||||
import org.telegram.messenger.LocaleController;
|
import org.telegram.messenger.LocaleController;
|
||||||
import org.telegram.messenger.MessagesController;
|
import org.telegram.messenger.MessagesController;
|
||||||
|
@ -51,15 +50,10 @@ import org.telegram.ui.Components.LayoutHelper;
|
||||||
import org.telegram.ui.Components.RecyclerListView;
|
import org.telegram.ui.Components.RecyclerListView;
|
||||||
import org.telegram.ui.Components.TranslateAlert2;
|
import org.telegram.ui.Components.TranslateAlert2;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.Timer;
|
|
||||||
|
|
||||||
public class RestrictedLanguagesSelectActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate {
|
public class RestrictedLanguagesSelectActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate {
|
||||||
|
|
||||||
|
@ -481,7 +475,7 @@ public class RestrictedLanguagesSelectActivity extends BaseFragment implements N
|
||||||
}
|
}
|
||||||
case 1: {
|
case 1: {
|
||||||
ShadowSectionCell sectionCell = (ShadowSectionCell) holder.itemView;
|
ShadowSectionCell sectionCell = (ShadowSectionCell) holder.itemView;
|
||||||
sectionCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
sectionCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2: {
|
case 2: {
|
||||||
|
|
|
@ -797,7 +797,7 @@ public class SessionsActivity extends BaseFragment implements NotificationCenter
|
||||||
} else {
|
} else {
|
||||||
privacyCell.setText(LocaleController.getString("ClearOtherWebSessionsHelp", R.string.ClearOtherWebSessionsHelp));
|
privacyCell.setText(LocaleController.getString("ClearOtherWebSessionsHelp", R.string.ClearOtherWebSessionsHelp));
|
||||||
}
|
}
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (position == otherSessionsTerminateDetail) {
|
} else if (position == otherSessionsTerminateDetail) {
|
||||||
if (currentType == 0) {
|
if (currentType == 0) {
|
||||||
if (sessions.isEmpty()) {
|
if (sessions.isEmpty()) {
|
||||||
|
@ -808,16 +808,16 @@ public class SessionsActivity extends BaseFragment implements NotificationCenter
|
||||||
} else {
|
} else {
|
||||||
privacyCell.setText(LocaleController.getString("TerminateWebSessionInfo", R.string.TerminateWebSessionInfo));
|
privacyCell.setText(LocaleController.getString("TerminateWebSessionInfo", R.string.TerminateWebSessionInfo));
|
||||||
}
|
}
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (position == passwordSessionsDetailRow) {
|
} else if (position == passwordSessionsDetailRow) {
|
||||||
privacyCell.setText(LocaleController.getString("LoginAttemptsInfo", R.string.LoginAttemptsInfo));
|
privacyCell.setText(LocaleController.getString("LoginAttemptsInfo", R.string.LoginAttemptsInfo));
|
||||||
if (otherSessionsTerminateDetail == -1) {
|
if (otherSessionsTerminateDetail == -1) {
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
} else if (position == qrCodeDividerRow || position == ttlDivideRow || position == noOtherSessionsRow) {
|
} else if (position == qrCodeDividerRow || position == ttlDivideRow || position == noOtherSessionsRow) {
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
privacyCell.setText("");
|
privacyCell.setText("");
|
||||||
privacyCell.setFixedSize(12);
|
privacyCell.setFixedSize(12);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1916,7 +1916,7 @@ public class StatisticActivity extends BaseFragment implements NotificationCente
|
||||||
if (child instanceof ChartCell) {
|
if (child instanceof ChartCell) {
|
||||||
((ChartCell) child).recolor();
|
((ChartCell) child).recolor();
|
||||||
} else if (child instanceof ShadowSectionCell) {
|
} else if (child instanceof ShadowSectionCell) {
|
||||||
Drawable shadowDrawable = Theme.getThemedDrawable(ApplicationLoader.applicationContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
Drawable shadowDrawable = Theme.getThemedDrawableByKey(ApplicationLoader.applicationContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
||||||
Drawable background = new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray));
|
Drawable background = new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray));
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(background, shadowDrawable, 0, 0);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
|
|
|
@ -71,7 +71,6 @@ import org.telegram.ui.Components.Bulletin;
|
||||||
import org.telegram.ui.Components.BulletinFactory;
|
import org.telegram.ui.Components.BulletinFactory;
|
||||||
import org.telegram.ui.Components.CubicBezierInterpolator;
|
import org.telegram.ui.Components.CubicBezierInterpolator;
|
||||||
import org.telegram.ui.Components.EmojiPacksAlert;
|
import org.telegram.ui.Components.EmojiPacksAlert;
|
||||||
import org.telegram.ui.Components.EmojiView;
|
|
||||||
import org.telegram.ui.Components.ItemOptions;
|
import org.telegram.ui.Components.ItemOptions;
|
||||||
import org.telegram.ui.Components.LayoutHelper;
|
import org.telegram.ui.Components.LayoutHelper;
|
||||||
import org.telegram.ui.Components.NumberTextView;
|
import org.telegram.ui.Components.NumberTextView;
|
||||||
|
@ -295,9 +294,7 @@ public class StickersActivity extends BaseFragment implements NotificationCenter
|
||||||
selectedCountTextView.setOnTouchListener((v, event) -> true);
|
selectedCountTextView.setOnTouchListener((v, event) -> true);
|
||||||
|
|
||||||
shareMenuItem = actionMode.addItemWithWidth(MENU_SHARE, R.drawable.msg_share, AndroidUtilities.dp(54));
|
shareMenuItem = actionMode.addItemWithWidth(MENU_SHARE, R.drawable.msg_share, AndroidUtilities.dp(54));
|
||||||
if (currentType != MediaDataController.TYPE_EMOJIPACKS) {
|
archiveMenuItem = actionMode.addItemWithWidth(MENU_ARCHIVE, R.drawable.msg_archive, AndroidUtilities.dp(54));
|
||||||
archiveMenuItem = actionMode.addItemWithWidth(MENU_ARCHIVE, R.drawable.msg_archive, AndroidUtilities.dp(54));
|
|
||||||
}
|
|
||||||
deleteMenuItem = actionMode.addItemWithWidth(MENU_DELETE, R.drawable.msg_delete, AndroidUtilities.dp(54));
|
deleteMenuItem = actionMode.addItemWithWidth(MENU_DELETE, R.drawable.msg_delete, AndroidUtilities.dp(54));
|
||||||
|
|
||||||
ArrayList<TLRPC.TL_messages_stickerSet> sets;
|
ArrayList<TLRPC.TL_messages_stickerSet> sets;
|
||||||
|
@ -656,14 +653,7 @@ public class StickersActivity extends BaseFragment implements NotificationCenter
|
||||||
|
|
||||||
loopRow = -1;
|
loopRow = -1;
|
||||||
loopInfoRow = -1;
|
loopInfoRow = -1;
|
||||||
|
archivedRow = -1;
|
||||||
if (currentType == MediaDataController.TYPE_EMOJIPACKS) {
|
|
||||||
suggestAnimatedEmojiRow = rowCount++;
|
|
||||||
suggestAnimatedEmojiInfoRow = rowCount++;
|
|
||||||
} else {
|
|
||||||
suggestAnimatedEmojiRow = -1;
|
|
||||||
suggestAnimatedEmojiInfoRow = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentType == MediaDataController.TYPE_IMAGE) {
|
if (currentType == MediaDataController.TYPE_IMAGE) {
|
||||||
featuredRow = rowCount++;
|
featuredRow = rowCount++;
|
||||||
|
@ -682,7 +672,7 @@ public class StickersActivity extends BaseFragment implements NotificationCenter
|
||||||
masksRow = -1;
|
masksRow = -1;
|
||||||
emojiPacksRow = -1;
|
emojiPacksRow = -1;
|
||||||
|
|
||||||
if (mediaDataController.getArchivedStickersCount(currentType) != 0 && currentType != MediaDataController.TYPE_EMOJIPACKS) {
|
if (mediaDataController.getArchivedStickersCount(currentType) != 0) {
|
||||||
boolean inserted = archivedRow == -1;
|
boolean inserted = archivedRow == -1;
|
||||||
|
|
||||||
archivedRow = rowCount++;
|
archivedRow = rowCount++;
|
||||||
|
@ -704,6 +694,14 @@ public class StickersActivity extends BaseFragment implements NotificationCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (currentType == MediaDataController.TYPE_EMOJIPACKS) {
|
||||||
|
suggestAnimatedEmojiRow = rowCount++;
|
||||||
|
suggestAnimatedEmojiInfoRow = rowCount++;
|
||||||
|
} else {
|
||||||
|
suggestAnimatedEmojiRow = -1;
|
||||||
|
suggestAnimatedEmojiInfoRow = -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (currentType == MediaDataController.TYPE_IMAGE) {
|
if (currentType == MediaDataController.TYPE_IMAGE) {
|
||||||
reactionsDoubleTapRow = rowCount++;
|
reactionsDoubleTapRow = rowCount++;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1206,7 +1204,7 @@ public class StickersActivity extends BaseFragment implements NotificationCenter
|
||||||
}
|
}
|
||||||
case TYPE_SHADOW:
|
case TYPE_SHADOW:
|
||||||
if (position == stickersShadowRow) {
|
if (position == stickersShadowRow) {
|
||||||
holder.itemView.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_SWITCH:
|
case TYPE_SWITCH:
|
||||||
|
@ -1367,7 +1365,7 @@ public class StickersActivity extends BaseFragment implements NotificationCenter
|
||||||
break;
|
break;
|
||||||
case TYPE_INFO:
|
case TYPE_INFO:
|
||||||
view = new TextInfoPrivacyCell(mContext);
|
view = new TextInfoPrivacyCell(mContext);
|
||||||
view.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
view.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
case TYPE_TEXT_AND_VALUE:
|
case TYPE_TEXT_AND_VALUE:
|
||||||
view = new TextCell(mContext);
|
view = new TextCell(mContext);
|
||||||
|
|
|
@ -101,7 +101,6 @@ import java.io.FileOutputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
@ -1940,7 +1939,7 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
|
||||||
break;
|
break;
|
||||||
case TYPE_TEXT_INFO_PRIVACY:
|
case TYPE_TEXT_INFO_PRIVACY:
|
||||||
view = new TextInfoPrivacyCell(mContext);
|
view = new TextInfoPrivacyCell(mContext);
|
||||||
view.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
view.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
break;
|
break;
|
||||||
case TYPE_SHADOW:
|
case TYPE_SHADOW:
|
||||||
view = new ShadowSectionCell(mContext);
|
view = new ShadowSectionCell(mContext);
|
||||||
|
@ -2244,9 +2243,9 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
|
||||||
}
|
}
|
||||||
case TYPE_SHADOW: {
|
case TYPE_SHADOW: {
|
||||||
if (position == nightTypeInfoRow && themeInfoRow == -1 || position == lastShadowRow || position == themeInfoRow && nightTypeInfoRow != -1 || position == saveToGallerySectionRow || position == settings2Row) {
|
if (position == nightTypeInfoRow && themeInfoRow == -1 || position == lastShadowRow || position == themeInfoRow && nightTypeInfoRow != -1 || position == saveToGallerySectionRow || position == settings2Row) {
|
||||||
holder.itemView.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
holder.itemView.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
holder.itemView.setBackground(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -322,7 +322,7 @@ public class ThemeSetUrlActivity extends BaseFragment implements NotificationCen
|
||||||
}
|
}
|
||||||
|
|
||||||
checkInfoCell = new TextInfoPrivacyCell(context);
|
checkInfoCell = new TextInfoPrivacyCell(context);
|
||||||
checkInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
checkInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
checkInfoCell.setVisibility(View.GONE);
|
checkInfoCell.setVisibility(View.GONE);
|
||||||
checkInfoCell.setBottomPadding(0);
|
checkInfoCell.setBottomPadding(0);
|
||||||
linearLayout.addView(checkInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout.addView(checkInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
@ -338,7 +338,7 @@ public class ThemeSetUrlActivity extends BaseFragment implements NotificationCen
|
||||||
linearLayout.addView(helpInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout.addView(helpInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
|
||||||
if (creatingNewTheme) {
|
if (creatingNewTheme) {
|
||||||
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
messagesCell = new ThemePreviewMessagesCell(context, parentLayout, 1);
|
messagesCell = new ThemePreviewMessagesCell(context, parentLayout, 1);
|
||||||
linearLayout.addView(messagesCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout.addView(messagesCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
|
|
||||||
|
@ -386,10 +386,10 @@ public class ThemeSetUrlActivity extends BaseFragment implements NotificationCen
|
||||||
|
|
||||||
createInfoCell = new TextInfoPrivacyCell(context);
|
createInfoCell = new TextInfoPrivacyCell(context);
|
||||||
createInfoCell.setText(AndroidUtilities.replaceTags(LocaleController.getString("UseDifferentThemeInfo", R.string.UseDifferentThemeInfo)));
|
createInfoCell.setText(AndroidUtilities.replaceTags(LocaleController.getString("UseDifferentThemeInfo", R.string.UseDifferentThemeInfo)));
|
||||||
createInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
createInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
linearLayout.addView(createInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
linearLayout.addView(createInfoCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
} else {
|
} else {
|
||||||
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info != null) {
|
if (info != null) {
|
||||||
|
@ -534,9 +534,9 @@ public class ThemeSetUrlActivity extends BaseFragment implements NotificationCen
|
||||||
if (TextUtils.isEmpty(text)) {
|
if (TextUtils.isEmpty(text)) {
|
||||||
checkInfoCell.setVisibility(View.GONE);
|
checkInfoCell.setVisibility(View.GONE);
|
||||||
if (creatingNewTheme) {
|
if (creatingNewTheme) {
|
||||||
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(getParentActivity(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(getParentActivity(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(getParentActivity(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(getParentActivity(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
checkInfoCell.setVisibility(View.VISIBLE);
|
checkInfoCell.setVisibility(View.VISIBLE);
|
||||||
|
@ -544,7 +544,7 @@ public class ThemeSetUrlActivity extends BaseFragment implements NotificationCen
|
||||||
checkInfoCell.setTag(colorKey);
|
checkInfoCell.setTag(colorKey);
|
||||||
checkInfoCell.setTextColorByKey(colorKey);
|
checkInfoCell.setTextColorByKey(colorKey);
|
||||||
if (creatingNewTheme) {
|
if (creatingNewTheme) {
|
||||||
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawable(getParentActivity(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
helpInfoCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(getParentActivity(), R.drawable.greydivider_top, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else {
|
} else {
|
||||||
helpInfoCell.setBackgroundDrawable(null);
|
helpInfoCell.setBackgroundDrawable(null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -464,7 +464,7 @@ public class TooManyCommunitiesActivity extends BaseFragment {
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
view = new ShadowSectionCell(parent.getContext());
|
view = new ShadowSectionCell(parent.getContext());
|
||||||
Drawable drawable = Theme.getThemedDrawable(parent.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
Drawable drawable = Theme.getThemedDrawableByKey(parent.getContext(), R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
view.setBackground(combinedDrawable);
|
view.setBackground(combinedDrawable);
|
||||||
|
|
|
@ -486,7 +486,7 @@ public class TopicCreateFragment extends BaseFragment {
|
||||||
|
|
||||||
TextInfoPrivacyCell infoCell = new TextInfoPrivacyCell(context);
|
TextInfoPrivacyCell infoCell = new TextInfoPrivacyCell(context);
|
||||||
infoCell.setText(LocaleController.getString("EditTopicHideInfo", R.string.EditTopicHideInfo));
|
infoCell.setText(LocaleController.getString("EditTopicHideInfo", R.string.EditTopicHideInfo));
|
||||||
infoCell.setBackground(Theme.getThemedDrawable(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow, getResourceProvider()));
|
infoCell.setBackground(Theme.getThemedDrawableByKey(getContext(), R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow, getResourceProvider()));
|
||||||
emojiContainer.addView(infoCell, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP, 0, 8 + 50, 0, 0));
|
emojiContainer.addView(infoCell, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP, 0, 8 + 50, 0, 0));
|
||||||
}
|
}
|
||||||
linearLayout.addView(emojiContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
|
linearLayout.addView(emojiContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
|
||||||
|
|
|
@ -1205,10 +1205,10 @@ public class TwoStepVerificationActivity extends BaseFragment implements Notific
|
||||||
TextInfoPrivacyCell privacyCell = (TextInfoPrivacyCell) holder.itemView;
|
TextInfoPrivacyCell privacyCell = (TextInfoPrivacyCell) holder.itemView;
|
||||||
if (position == setPasswordDetailRow) {
|
if (position == setPasswordDetailRow) {
|
||||||
privacyCell.setText(LocaleController.getString("SetAdditionalPasswordInfo", R.string.SetAdditionalPasswordInfo));
|
privacyCell.setText(LocaleController.getString("SetAdditionalPasswordInfo", R.string.SetAdditionalPasswordInfo));
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
} else if (position == passwordEnabledDetailRow) {
|
} else if (position == passwordEnabledDetailRow) {
|
||||||
privacyCell.setText(LocaleController.getString("EnabledPasswordText", R.string.EnabledPasswordText));
|
privacyCell.setText(LocaleController.getString("EnabledPasswordText", R.string.EnabledPasswordText));
|
||||||
privacyCell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
privacyCell.setBackgroundDrawable(Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1814,7 +1814,7 @@ public class WallpapersListActivity extends BaseFragment implements Notification
|
||||||
}
|
}
|
||||||
case 1: {
|
case 1: {
|
||||||
view = new ShadowSectionCell(mContext);
|
view = new ShadowSectionCell(mContext);
|
||||||
Drawable drawable = Theme.getThemedDrawable(mContext, wallPaperStartRow == -1 ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
Drawable drawable = Theme.getThemedDrawableByKey(mContext, wallPaperStartRow == -1 ? R.drawable.greydivider_bottom : R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
view.setBackgroundDrawable(combinedDrawable);
|
view.setBackgroundDrawable(combinedDrawable);
|
||||||
|
@ -1822,7 +1822,7 @@ public class WallpapersListActivity extends BaseFragment implements Notification
|
||||||
}
|
}
|
||||||
case 3: {
|
case 3: {
|
||||||
view = new TextInfoPrivacyCell(mContext);
|
view = new TextInfoPrivacyCell(mContext);
|
||||||
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
|
Drawable drawable = Theme.getThemedDrawableByKey(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
|
||||||
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
|
||||||
combinedDrawable.setFullsize(true);
|
combinedDrawable.setFullsize(true);
|
||||||
view.setBackgroundDrawable(combinedDrawable);
|
view.setBackgroundDrawable(combinedDrawable);
|
||||||
|
|
|
@ -1907,6 +1907,7 @@
|
||||||
<string name="ArchivedMasksEmpty">No archived masks</string>
|
<string name="ArchivedMasksEmpty">No archived masks</string>
|
||||||
<string name="ArchivedEmojiPacksEmpty">No archived emoji packs</string>
|
<string name="ArchivedEmojiPacksEmpty">No archived emoji packs</string>
|
||||||
<string name="ArchivedStickersInfo">You can add up to 200 sticker sets.\nUnused sets are archived when you add more.</string>
|
<string name="ArchivedStickersInfo">You can add up to 200 sticker sets.\nUnused sets are archived when you add more.</string>
|
||||||
|
<string name="ArchivedEmojiInfo">You can add up to 200 emoji packs.\nUnused packs are archived when you add more.</string>
|
||||||
<string name="ArchivedMasksInfo">You can have up to 200 sets of masks.\nUnused sets are archived when you add more.</string>
|
<string name="ArchivedMasksInfo">You can have up to 200 sets of masks.\nUnused sets are archived when you add more.</string>
|
||||||
<string name="SendSticker">SEND STICKER</string>
|
<string name="SendSticker">SEND STICKER</string>
|
||||||
<string name="ArchivedStickersAlertTitle">Archived stickers</string>
|
<string name="ArchivedStickersAlertTitle">Archived stickers</string>
|
||||||
|
@ -6598,4 +6599,6 @@
|
||||||
<string name="ChatThemeDaySwitchTooltip">Tap to view this theme in the day mode.</string>
|
<string name="ChatThemeDaySwitchTooltip">Tap to view this theme in the day mode.</string>
|
||||||
<string name="ChatThemeNightSwitchTooltip">Tap to view this theme in the night mode.</string>
|
<string name="ChatThemeNightSwitchTooltip">Tap to view this theme in the night mode.</string>
|
||||||
<string name="BotWebAppInstantViewOpen">Open App</string>
|
<string name="BotWebAppInstantViewOpen">Open App</string>
|
||||||
|
<string name="RestorePremiumHintTitle">Get Premium back with up to **%1$d%%** off</string>
|
||||||
|
<string name="RestorePremiumHintMessage">Your Telegram Premium has recently expired. Tap here to extend it.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
# org.gradle.parallel=true
|
# org.gradle.parallel=true
|
||||||
#Sat Mar 12 05:53:50 MSK 2016
|
#Sat Mar 12 05:53:50 MSK 2016
|
||||||
APP_VERSION_CODE=3333
|
APP_VERSION_CODE=3341
|
||||||
APP_VERSION_NAME=9.6.1
|
APP_VERSION_NAME=9.6.2
|
||||||
APP_PACKAGE=org.telegram.messenger
|
APP_PACKAGE=org.telegram.messenger
|
||||||
RELEASE_KEY_PASSWORD=android
|
RELEASE_KEY_PASSWORD=android
|
||||||
RELEASE_KEY_ALIAS=androidkey
|
RELEASE_KEY_ALIAS=androidkey
|
||||||
|
|
Loading…
Reference in a new issue