mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Tuning settings dialog.
This commit is contained in:
@@ -129,7 +129,7 @@ android {
|
||||
defaultConfig {
|
||||
minSdkVersion 14 // 14: Android 4.0 Ice Cream Sandwich 2011 (Telegram default), 21: Android 5.0 Lollipop 2014 (recommended for InstantRun)
|
||||
targetSdkVersion 23
|
||||
versionName "0.1.8"
|
||||
versionName "0.1.9"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1263,7 +1263,7 @@ public class ImageLoader {
|
||||
});
|
||||
}
|
||||
|
||||
public HashMap<Integer, File> createMediaPaths() {
|
||||
public HashMap<Integer, File> createMediaPaths() { // not sure, but it seems as if these paths are not needed
|
||||
HashMap<Integer, File> mediaDirs = new HashMap<>();
|
||||
File cachePath = AndroidUtilities.getCacheDir();
|
||||
if (!cachePath.isDirectory()) {
|
||||
|
||||
@@ -2994,7 +2994,7 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
|
||||
editor.commit();
|
||||
}
|
||||
|
||||
public void checkSaveToGalleryFiles() {
|
||||
public void checkSaveToGalleryFiles() { // not sure, but it seems as if these paths are not needed
|
||||
try {
|
||||
File messengerPath = new File(Environment.getExternalStorageDirectory(), "Delta Chat");
|
||||
File imagePath = new File(messengerPath, "Delta Chat Images");
|
||||
|
||||
@@ -2084,6 +2084,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
});
|
||||
presentFragment(fragment);
|
||||
} else if (which == ChatAttachAlert.ATTACH_BUTTON_IDX_VIDEO) {
|
||||
Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_LONG).show();
|
||||
try {
|
||||
Intent takeVideoIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
|
||||
File video = AndroidUtilities.generateVideoPath();
|
||||
@@ -2101,6 +2102,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
} else if (which == ChatAttachAlert.ATTACH_BUTTON_IDX_LOCATION ) {
|
||||
Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_LONG).show();
|
||||
} else if (which == ChatAttachAlert.ATTACH_BUTTON_IDX_FILE ) {
|
||||
Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_LONG).show();
|
||||
if (Build.VERSION.SDK_INT >= 23 && getParentActivity().checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
|
||||
getParentActivity().requestPermissions(new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 4);
|
||||
return;
|
||||
@@ -2127,6 +2129,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
});
|
||||
presentFragment(fragment);
|
||||
} else if (which == ChatAttachAlert.ATTACH_BUTTON_IDX_MUSIC ) {
|
||||
Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_LONG).show();
|
||||
if (Build.VERSION.SDK_INT >= 23 && getParentActivity().checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
|
||||
getParentActivity().requestPermissions(new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 4);
|
||||
return;
|
||||
@@ -2141,6 +2144,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
});
|
||||
presentFragment(fragment);
|
||||
} else if (which == ChatAttachAlert.ATTACH_BUTTON_IDX_CONTACT ) {
|
||||
Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_LONG).show();
|
||||
if (Build.VERSION.SDK_INT >= 23) {
|
||||
if (getParentActivity().checkSelfPermission(Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) {
|
||||
getParentActivity().requestPermissions(new String[]{Manifest.permission.READ_CONTACTS}, 5);
|
||||
|
||||
@@ -2149,6 +2149,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
||||
AndroidUtilities.hideKeyboard(messageEditText);
|
||||
}
|
||||
} else if (id == NotificationCenter.recordStartError || id == NotificationCenter.recordStopped) {
|
||||
Toast.makeText(getContext(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_LONG).show();
|
||||
if (recordingAudio) {
|
||||
MessagesController.getInstance().sendTyping(dialog_id, 2, 0);
|
||||
recordingAudio = false;
|
||||
|
||||
@@ -177,17 +177,15 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
privacyRow = rowCount++;
|
||||
notificationRow = rowCount++;
|
||||
backgroundRow = rowCount++;
|
||||
enableAnimationsRow = rowCount++;
|
||||
languageRow = rowCount++;
|
||||
|
||||
mediaDownloadSection = rowCount++;
|
||||
mediaDownloadSection2 = rowCount++;
|
||||
autoplayGifsRow = rowCount++;
|
||||
mediaDownloadSection = -1;
|
||||
mediaDownloadSection2 = -1;
|
||||
autoplayGifsRow = -1;//rowCount++;
|
||||
mobileDownloadRow = -1;//rowCount++;
|
||||
wifiDownloadRow = -1;//rowCount++;
|
||||
roamingDownloadRow = -1;//rowCount++;
|
||||
saveToGalleryRow = -1;//rowCount++; -- for now, we do not use this option, this results in confusing folders ("AppName" and "AppName Images" etc.); instead, for now, the user can use the option to manually save a media
|
||||
cacheRow = rowCount++;
|
||||
|
||||
messagesSectionRow = rowCount++;
|
||||
messagesSectionRow2 = rowCount++;
|
||||
@@ -201,6 +199,8 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
}
|
||||
raiseToSpeakRow = rowCount++; // outgoing message
|
||||
sendByEnterRow = rowCount++;
|
||||
enableAnimationsRow = rowCount++;
|
||||
cacheRow = rowCount++;
|
||||
|
||||
supportSectionRow = rowCount++;
|
||||
supportSectionRow2 = rowCount++;
|
||||
@@ -1226,7 +1226,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
} else if (i == stickersRow) {
|
||||
textCell.setText(LocaleController.getString("Stickers", R.string.Stickers), true);
|
||||
} else if (i == cacheRow) {
|
||||
textCell.setText(LocaleController.getString("CacheSettings", R.string.CacheSettings), true);
|
||||
textCell.setText(LocaleController.getString("CacheSettings", R.string.CacheSettings), false);
|
||||
}
|
||||
/* EDIT BY MR
|
||||
else if (i == privacyPolicyRow) {
|
||||
@@ -1241,9 +1241,9 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
|
||||
if (i == enableAnimationsRow) {
|
||||
textCell.setTextAndCheck(LocaleController.getString("EnableAnimations", R.string.EnableAnimations), preferences.getBoolean("view_animations", true), true);
|
||||
textCell.setTextAndCheck(LocaleController.getString("EnableAnimations", R.string.EnableAnimations), preferences.getBoolean("view_animations", true), false);
|
||||
} else if (i == sendByEnterRow) {
|
||||
textCell.setTextAndCheck(LocaleController.getString("SendByEnter", R.string.SendByEnter), preferences.getBoolean("send_by_enter", false), false);
|
||||
textCell.setTextAndCheck(LocaleController.getString("SendByEnter", R.string.SendByEnter), preferences.getBoolean("send_by_enter", false), true);
|
||||
} else if (i == saveToGalleryRow) {
|
||||
textCell.setTextAndCheck(LocaleController.getString("SaveToGallerySettings", R.string.SaveToGallerySettings), MediaController.getInstance().canSaveToGallery(), true);
|
||||
} else if (i == autoplayGifsRow) {
|
||||
@@ -1262,7 +1262,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
} else if (i == supportSectionRow2) {
|
||||
((HeaderCell) view).setText(LocaleController.getString("Info", R.string.Info)); // EDIT BY MR -- was: Support
|
||||
} else if (i == messagesSectionRow2) {
|
||||
((HeaderCell) view).setText(LocaleController.getString("MessagesSettings", R.string.MessagesSettings));
|
||||
((HeaderCell) view).setText(LocaleController.getString("AdvancedSettings", R.string.AdvancedSettings));
|
||||
} else if (i == mediaDownloadSection2) {
|
||||
((HeaderCell) view).setText(LocaleController.getString("Media", R.string.Media));
|
||||
} else if (i == numberSectionRow) {
|
||||
|
||||
@@ -677,7 +677,7 @@
|
||||
<string name="MuteAlways">Dauerhaft stumm</string>
|
||||
<string name="AskStartChatWith">Chat mit <![CDATA[<b>]]>%1$s<![CDATA[</b>]]> starten?</string>
|
||||
<string name="DeaddropHint">Ein Klick auf die Antwort-Pfeile startet einen Chat.</string>
|
||||
<string name="NotYetImplemented">Diese Funktion ist noch nicht eingebaut.</string>
|
||||
<string name="NotYetImplemented">Diese Funktion ist nicht oder nur unvollständig eingebaut.</string>
|
||||
<string name="DefaultStatusText">Mit meinem Delta Chat Messenger gesendet</string>
|
||||
<string name="SubjectPrefix">Sofortnachricht</string>
|
||||
<string name="SeachUser">Benutzer suchen</string>
|
||||
@@ -695,4 +695,6 @@
|
||||
<string name="ConfiguringAccount">Konto konfigurieren...</string>
|
||||
<string name="InviteMenuEntry">Einladungen versenden</string>
|
||||
<string name="InviteText">Ich verwende nun auch den Delta Chat Messenger - %1$s - und bin dort unter %2$s erreichbar.</string>
|
||||
<string name="AdvancedSettings">Erweiterte Einstellungen</string>
|
||||
<string name="CannotConnect"></string>
|
||||
</resources>
|
||||
|
||||
@@ -676,7 +676,7 @@
|
||||
<string name="MuteAlways">Always muted</string>
|
||||
<string name="AskStartChatWith">Start a chat with <![CDATA[<b>]]>%1$s<![CDATA[</b>]]>?</string>
|
||||
<string name="DeaddropHint">To start a chat, click on the reply-arrows.</string>
|
||||
<string name="NotYetImplemented">This function is not yet available.</string>
|
||||
<string name="NotYetImplemented">This function is not available or incomplete.</string>
|
||||
<string name="DefaultStatusText">Sent with my Delta Chat Messenger</string>
|
||||
<string name="SubjectPrefix">Instant message</string>
|
||||
<string name="SeachUser">Search user</string>
|
||||
@@ -696,4 +696,5 @@
|
||||
<string name="Intro7Message"><![CDATA[<b>Delta Chat</b>]]> is safe for business use, compatible and standards-based.</string>
|
||||
<string name="InviteMenuEntry">Send invitations</string>
|
||||
<string name="InviteText">I\'m using Delta Chat messenger now - %1$s - you can text me at %2$s</string>
|
||||
<string name="AdvancedSettings">Advanced settings</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user