mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Mark changes.
This commit is contained in:
@@ -53,7 +53,7 @@ public class ApplicationLoader extends Application {
|
||||
public static volatile boolean isScreenOn = false;
|
||||
public static volatile boolean mainInterfacePaused = true;
|
||||
|
||||
public static long hMailbox = 0;
|
||||
public static long hMailbox = 0; // EDIT BY MR
|
||||
|
||||
public static boolean isCustomTheme() {
|
||||
return isCustomTheme;
|
||||
@@ -197,7 +197,7 @@ public class ApplicationLoader extends Application {
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
return new File("/data/data/com.b44t.messenger/files");
|
||||
return new File("/data/data/com.b44t.messenger/files"); // EDIT BY MR
|
||||
}
|
||||
|
||||
public static void postInitApplication() {
|
||||
@@ -281,7 +281,7 @@ public class ApplicationLoader extends Application {
|
||||
ContactsController.getInstance().checkAppAccount();
|
||||
MediaController.getInstance();
|
||||
|
||||
// open my sqlite file (you can inspect the file eg. with "Tools / Android Device Monitor / File Explorer")
|
||||
// EDIT BY MR - open my sqlite file (you can inspect the file eg. with "Tools / Android Device Monitor / File Explorer")
|
||||
File dbfile = new File(getFilesDirFixed(), "mrmailbox.db");
|
||||
MrMailbox.MrMailboxOpen(ApplicationLoader.hMailbox, dbfile.getAbsolutePath());
|
||||
}
|
||||
@@ -295,7 +295,7 @@ public class ApplicationLoader extends Application {
|
||||
ConnectionsManager.native_setJava(Build.VERSION.SDK_INT == 14 || Build.VERSION.SDK_INT == 15);
|
||||
new ForegroundDetector(this);
|
||||
|
||||
// create a MrMailbox object; as android stops the App by just killing it, we do never call MrMailboxUnref()
|
||||
// EDIT BY MR - create a MrMailbox object; as android stops the App by just killing it, we do never call MrMailboxUnref()
|
||||
// however, we may want to to have a look at onPause() eg. of activities (eg. for flushing data, if needed)
|
||||
hMailbox = MrMailbox.MrMailboxNew();
|
||||
|
||||
|
||||
@@ -49,8 +49,8 @@ public class ContactsController {
|
||||
private boolean contactsBookLoaded = false;
|
||||
private String lastContactsVersions = "";
|
||||
private ArrayList<Integer> delayedContactsUpdate = new ArrayList<>();
|
||||
//private String inviteText; // EDIT BY ME
|
||||
//private boolean updatingInviteText = false;
|
||||
//private String inviteText; // EDIT BY MR
|
||||
//private boolean updatingInviteText = false; // EDIT BY MR
|
||||
private HashMap<String, String> sectionsToReplace = new HashMap<>();
|
||||
|
||||
private int loadingDeleteInfo = 0;
|
||||
@@ -175,7 +175,7 @@ public class ContactsController {
|
||||
privacyRules = null;
|
||||
}
|
||||
|
||||
/* // EDIT BY ME
|
||||
/* // EDIT BY MR
|
||||
public void checkInviteText() {
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
|
||||
inviteText = preferences.getString("invitetext", null);
|
||||
@@ -210,10 +210,10 @@ public class ContactsController {
|
||||
}, ConnectionsManager.RequestFlagFailOnServerErrors);
|
||||
}
|
||||
}
|
||||
EDIT BY ME*/
|
||||
EDIT BY MR*/
|
||||
|
||||
public String getInviteText() {
|
||||
return /* EDIT BY ME inviteText != null ? inviteText :*/ LocaleController.getString("InviteText", R.string.InviteText);
|
||||
return /* EDIT BY MR inviteText != null ? inviteText :*/ LocaleController.getString("InviteText", R.string.InviteText);
|
||||
}
|
||||
|
||||
public void checkAppAccount() {
|
||||
|
||||
@@ -115,6 +115,8 @@ public class ConnectionsManager {
|
||||
}
|
||||
|
||||
public int sendRequest(final TLObject object, final RequestDelegate onComplete, final QuickAckDelegate onQuickAck, final int flags, final int datacenterId, final int connetionType, final boolean immediate) {
|
||||
return 0; // EDIT BY MR
|
||||
/* EDIT BY MR
|
||||
final int requestToken = lastRequestToken.getAndIncrement();
|
||||
Utilities.stageQueue.postRunnable(new Runnable() {
|
||||
@Override
|
||||
@@ -164,6 +166,7 @@ public class ConnectionsManager {
|
||||
}
|
||||
});
|
||||
return requestToken;
|
||||
EDIT BY MR */
|
||||
}
|
||||
|
||||
public void cancelRequest(int token, boolean notifyServer) {
|
||||
@@ -187,10 +190,13 @@ public class ConnectionsManager {
|
||||
}
|
||||
|
||||
public int getConnectionState() {
|
||||
return ConnectionStateWaitingForNetwork; // EDIT BY MR - we're always disconnected from the view of the caller
|
||||
/* EDIT BY MR
|
||||
if (connectionState == ConnectionStateConnected && isUpdating) {
|
||||
return ConnectionStateUpdating;
|
||||
}
|
||||
return connectionState;
|
||||
EDIT BY MR */
|
||||
}
|
||||
|
||||
public void setUserId(int id) {
|
||||
|
||||
@@ -17916,7 +17916,6 @@ public class TLRPC {
|
||||
}
|
||||
}
|
||||
|
||||
/* EDIT BY ME
|
||||
public static class TL_help_getInviteText extends TLObject {
|
||||
public static int constructor = 0x4d392343;
|
||||
|
||||
@@ -17929,7 +17928,6 @@ public class TLRPC {
|
||||
stream.writeInt32(constructor);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
public static class TL_photos_getUserPhotos extends TLObject {
|
||||
public static int constructor = 0x91cd32a8;
|
||||
|
||||
@@ -115,7 +115,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
|
||||
needPhonebook = true;
|
||||
}
|
||||
|
||||
//ContactsController.getInstance().checkInviteText(); // EDIT BY ME
|
||||
//ContactsController.getInstance().checkInviteText(); // EDIT BY MR
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
|
||||
if (!dialogsLoaded) {
|
||||
MessagesController.getInstance().loadDialogs(0, 100, true);
|
||||
//ContactsController.getInstance().checkInviteText(); // EDIT BY ME
|
||||
//ContactsController.getInstance().checkInviteText(); // EDIT BY MR
|
||||
dialogsLoaded = true;
|
||||
}
|
||||
return true;
|
||||
@@ -339,6 +339,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
if (listView == null || listView.getAdapter() == null) {
|
||||
return;
|
||||
}
|
||||
// TODO BY MR - handle single click
|
||||
long dialog_id = 0;
|
||||
int message_id = 0;
|
||||
RecyclerView.Adapter adapter = listView.getAdapter();
|
||||
@@ -480,7 +481,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
}
|
||||
return false;
|
||||
}
|
||||
TLRPC.TL_dialog dialog;
|
||||
TLRPC.TL_dialog dialog; // TODO BY MR - handle long clicks
|
||||
ArrayList<TLRPC.TL_dialog> dialogs = getDialogsArray();
|
||||
if (position < 0 || position >= dialogs.size()) {
|
||||
return false;
|
||||
@@ -686,11 +687,11 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
|
||||
int firstVisibleItem = layoutManager.findFirstVisibleItemPosition();
|
||||
int visibleItemCount = Math.abs(layoutManager.findLastVisibleItemPosition() - firstVisibleItem) + 1;
|
||||
int totalItemCount = recyclerView.getAdapter().getItemCount();
|
||||
int totalItemCount = recyclerView.getAdapter().getItemCount(); // TODO BY MR - recyclerView.adapter muss angepasst werden?
|
||||
|
||||
if (searching && searchWas) {
|
||||
if (visibleItemCount > 0 && layoutManager.findLastVisibleItemPosition() == totalItemCount - 1 && !dialogsSearchAdapter.isMessagesSearchEndReached()) {
|
||||
dialogsSearchAdapter.loadMoreSearchMessages();
|
||||
dialogsSearchAdapter.loadMoreSearchMessages(); // TODO BY MR - what about this issue?
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -937,7 +938,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
if (dialogsAdapter.isDataSetChanged()) {
|
||||
dialogsAdapter.notifyDataSetChanged();
|
||||
} else {
|
||||
updateVisibleRows(MessagesController.UPDATE_MASK_NEW_MESSAGE);
|
||||
updateVisibleRows(MessagesController.UPDATE_MASK_NEW_MESSAGE); // TODO BY MR?
|
||||
}
|
||||
}
|
||||
if (dialogsSearchAdapter != null) {
|
||||
|
||||
@@ -58,7 +58,7 @@ import org.telegram.messenger.AnimatorListenerAdapterProxy;
|
||||
import org.telegram.PhoneFormat.PhoneFormat;
|
||||
import org.telegram.messenger.ContactsController;
|
||||
import org.telegram.messenger.MediaController;
|
||||
import org.telegram.messenger.MrMailbox;
|
||||
import org.telegram.messenger.MrMailbox; // EDIT BY MR
|
||||
import org.telegram.messenger.UserObject;
|
||||
import org.telegram.messenger.ApplicationLoader;
|
||||
import org.telegram.messenger.BuildVars;
|
||||
@@ -146,9 +146,9 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
private int sendByEnterRow;
|
||||
private int supportSectionRow;
|
||||
private int supportSectionRow2;
|
||||
//private int askQuestionRow;// EDIT BY ME
|
||||
//private int askQuestionRow;// EDIT BY MR
|
||||
private int telegramFaqRow;
|
||||
//private int privacyPolicyRow;// EDIT BY ME
|
||||
//private int privacyPolicyRow;// EDIT BY MR
|
||||
private int sendLogsRow;
|
||||
private int clearLogsRow;
|
||||
private int switchBackendButtonRow;
|
||||
@@ -266,9 +266,9 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
sendByEnterRow = rowCount++;
|
||||
supportSectionRow = rowCount++;
|
||||
supportSectionRow2 = rowCount++;
|
||||
//askQuestionRow = rowCount++; // EDIT BY ME
|
||||
//askQuestionRow = rowCount++; // EDIT BY MR
|
||||
telegramFaqRow = rowCount++;
|
||||
//privacyPolicyRow = rowCount++; // EDIT BY ME
|
||||
//privacyPolicyRow = rowCount++; // EDIT BY MR
|
||||
if (BuildVars.DEBUG_VERSION) {
|
||||
sendLogsRow = rowCount++;
|
||||
clearLogsRow = rowCount++;
|
||||
@@ -416,7 +416,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
} else if (i == backgroundRow) {
|
||||
presentFragment(new WallpapersActivity());
|
||||
}
|
||||
/* EDIT BY ME
|
||||
/* EDIT BY MR
|
||||
else if (i == askQuestionRow) {
|
||||
if (getParentActivity() == null) {
|
||||
return;
|
||||
@@ -439,7 +439,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
|
||||
showDialog(builder.create());
|
||||
}
|
||||
EDIT BY ME */
|
||||
EDIT BY MR */
|
||||
else if (i == sendLogsRow) {
|
||||
sendLogs();
|
||||
} else if (i == clearLogsRow) {
|
||||
@@ -500,11 +500,11 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
} else if (i == telegramFaqRow) {
|
||||
Browser.openUrl(getParentActivity(), LocaleController.getString("TelegramFaqUrl", R.string.TelegramFaqUrl));
|
||||
}
|
||||
/* EDIT BY ME
|
||||
/* EDIT BY MR
|
||||
else if (i == privacyPolicyRow) {
|
||||
Browser.openUrl(getParentActivity(), LocaleController.getString("PrivacyPolicyUrl", R.string.PrivacyPolicyUrl));
|
||||
}
|
||||
EDIT BY ME */
|
||||
EDIT BY MR */
|
||||
else if (i == contactsReimportRow) {
|
||||
//not implemented
|
||||
} else if (i == contactsSortRow) {
|
||||
@@ -1188,10 +1188,10 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
@Override
|
||||
public boolean isEnabled(int i) {
|
||||
return i == textSizeRow || i == enableAnimationsRow || i == notificationRow || i == backgroundRow || i == numberRow ||
|
||||
/* EDIT BY ME i == askQuestionRow ||*/ i == sendLogsRow || i == sendByEnterRow || i == autoplayGifsRow || i == privacyRow || i == wifiDownloadRow ||
|
||||
/* EDIT BY MR i == askQuestionRow ||*/ i == sendLogsRow || i == sendByEnterRow || i == autoplayGifsRow || i == privacyRow || i == wifiDownloadRow ||
|
||||
i == mobileDownloadRow || i == clearLogsRow || i == roamingDownloadRow || i == languageRow || i == usernameRow ||
|
||||
i == switchBackendButtonRow || i == telegramFaqRow || i == contactsSortRow || i == contactsReimportRow || i == saveToGalleryRow ||
|
||||
i == stickersRow || i == cacheRow || i == raiseToSpeakRow /* EDIT BY ME|| i == privacyPolicyRow*/ || i == customTabsRow || i == directShareRow || i == versionRow;
|
||||
i == stickersRow || i == cacheRow || i == raiseToSpeakRow /* EDIT BY MR|| i == privacyPolicyRow*/ || i == customTabsRow || i == directShareRow || i == versionRow;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1262,10 +1262,10 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
} else if (i == clearLogsRow) {
|
||||
textCell.setText("Clear Logs", true);
|
||||
}
|
||||
/* EDIT BY ME else if (i == askQuestionRow) {
|
||||
/* EDIT BY MR else if (i == askQuestionRow) {
|
||||
textCell.setText(LocaleController.getString("AskAQuestion", R.string.AskAQuestion), true);
|
||||
}
|
||||
*/
|
||||
EDIT BY MR*/
|
||||
else if (i == privacyRow) {
|
||||
textCell.setText(LocaleController.getString("PrivacySettings", R.string.PrivacySettings), true);
|
||||
} else if (i == switchBackendButtonRow) {
|
||||
@@ -1279,11 +1279,11 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
} else if (i == cacheRow) {
|
||||
textCell.setText(LocaleController.getString("CacheSettings", R.string.CacheSettings), true);
|
||||
}
|
||||
/* EDIT BY ME
|
||||
/* EDIT BY MR
|
||||
else if (i == privacyPolicyRow) {
|
||||
textCell.setText(LocaleController.getString("PrivacyPolicy", R.string.PrivacyPolicy), true);
|
||||
}
|
||||
*/
|
||||
EDIT BY MR*/
|
||||
} else if (type == 3) {
|
||||
if (view == null) {
|
||||
view = new TextCheckCell(mContext);
|
||||
@@ -1343,7 +1343,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
break;
|
||||
}
|
||||
((TextInfoCell) view).setText(String.format(Locale.US, "V%s (%d), Backend V%s (%s)",
|
||||
pInfo.versionName, code, MrMailbox.MrGetVersionStr(), abi)); // EDIT BY ME
|
||||
pInfo.versionName, code, MrMailbox.MrGetVersionStr(), abi)); // EDIT BY MR
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
}
|
||||
@@ -1438,7 +1438,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
return 1;
|
||||
} else if (i == enableAnimationsRow || i == sendByEnterRow || i == saveToGalleryRow || i == autoplayGifsRow || i == raiseToSpeakRow || i == customTabsRow || i == directShareRow) {
|
||||
return 3;
|
||||
} else if (i == notificationRow || i == backgroundRow /*|| i == askQuestionRow EDIT BY ME*/ || i == sendLogsRow || i == privacyRow || i == clearLogsRow || i == switchBackendButtonRow || i == telegramFaqRow || i == contactsReimportRow || i == textSizeRow || i == languageRow || i == contactsSortRow || i == stickersRow || i == cacheRow /*EDIT BY ME|| i == privacyPolicyRow*/) {
|
||||
} else if (i == notificationRow || i == backgroundRow /*|| i == askQuestionRow EDIT BY MR*/ || i == sendLogsRow || i == privacyRow || i == clearLogsRow || i == switchBackendButtonRow || i == telegramFaqRow || i == contactsReimportRow || i == textSizeRow || i == languageRow || i == contactsSortRow || i == stickersRow || i == cacheRow /*EDIT BY ME|| i == privacyPolicyRow*/) {
|
||||
return 2;
|
||||
} else if (i == versionRow) {
|
||||
return 5;
|
||||
|
||||
Reference in New Issue
Block a user