diff --git a/MessengerProj/src/main/java/com/b44t/ui/CacheControlActivity.java b/MessengerProj/src/main/java/com/b44t/ui/CacheControlActivity.java index a7ad883d5..8df613960 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/CacheControlActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/CacheControlActivity.java @@ -557,7 +557,7 @@ public class CacheControlActivity extends BaseFragment { } }); - Toast.makeText(context, LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_LONG).show(); + Toast.makeText(context, LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_SHORT).show(); return fragmentView; } diff --git a/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java b/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java index c19323a35..728e0944a 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java @@ -447,7 +447,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not } createDeleteMessagesAlert(); } else if (id == id_forward) { - Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_LONG).show(); + Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_SHORT).show(); /* Bundle args = new Bundle(); args.putBoolean("onlySelect", true); @@ -490,7 +490,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not } } else{ - Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_LONG).show(); + Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_SHORT).show(); actionBar.hideActionMode(); updateVisibleRows(); } @@ -1285,7 +1285,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(); + Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_SHORT).show(); try { Intent takeVideoIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE); File video = AndroidUtilities.generateVideoPath(); @@ -1301,9 +1301,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not FileLog.e("messenger", e); } } else if (which == ChatAttachAlert.ATTACH_BUTTON_IDX_LOCATION ) { - Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_LONG).show(); + Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_SHORT).show(); } else if (which == ChatAttachAlert.ATTACH_BUTTON_IDX_FILE ) { - Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_LONG).show(); + Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_SHORT).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; @@ -1330,7 +1330,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(); + Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_SHORT).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; @@ -1345,7 +1345,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(); + Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_SHORT).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); diff --git a/MessengerProj/src/main/java/com/b44t/ui/Components/ChatActivityEnterView.java b/MessengerProj/src/main/java/com/b44t/ui/Components/ChatActivityEnterView.java index 0586c3c12..d98bfffc5 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Components/ChatActivityEnterView.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Components/ChatActivityEnterView.java @@ -793,13 +793,14 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe @Override public boolean onTouch(View view, MotionEvent motionEvent) { if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) { + /* if (parentFragment != null) { if (Build.VERSION.SDK_INT >= 23 && parentActivity.checkSelfPermission(Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) { parentActivity.requestPermissions(new String[]{Manifest.permission.RECORD_AUDIO}, 3); return false; } - /*String action; + String action; TLRPC.Chat currentChat; if ((int) dialog_id < 0) { currentChat = MessagesController.getInstance().getChat(-(int) dialog_id); @@ -810,17 +811,21 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe } } else { action = "pm_upload_audio"; - }*/ + } } startedDraggingX = -1; MediaController.getInstance().startRecording(dialog_id, replyingMessageObject); updateAudioRecordIntefrace(); audioSendButton.getParent().requestDisallowInterceptTouchEvent(true); + */ } else if (motionEvent.getAction() == MotionEvent.ACTION_UP || motionEvent.getAction() == MotionEvent.ACTION_CANCEL) { + Toast.makeText(getContext(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_SHORT).show(); + /* startedDraggingX = -1; MediaController.getInstance().stopRecording(1); recordingAudio = false; updateAudioRecordIntefrace(); + */ } else if (motionEvent.getAction() == MotionEvent.ACTION_MOVE && recordingAudio) { float x = motionEvent.getX(); if (x < -distCanMove) { @@ -2061,7 +2066,6 @@ 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; diff --git a/MessengerProj/src/main/java/com/b44t/ui/ContactAddActivity.java b/MessengerProj/src/main/java/com/b44t/ui/ContactAddActivity.java index 5fe4bd0cd..005a36658 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/ContactAddActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/ContactAddActivity.java @@ -346,7 +346,7 @@ public class ContactAddActivity extends BaseFragment implements NotificationCent @Override public void didUploadedPhoto(final TLRPC.InputFile file, final TLRPC.PhotoSize small, final TLRPC.PhotoSize big) { - Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_LONG).show(); + Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_SHORT).show(); } @Override diff --git a/MessengerProj/src/main/java/com/b44t/ui/GroupCreateFinalActivity.java b/MessengerProj/src/main/java/com/b44t/ui/GroupCreateFinalActivity.java index 5d50294fe..e29646710 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/GroupCreateFinalActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/GroupCreateFinalActivity.java @@ -295,7 +295,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati @Override public void didUploadedPhoto(final TLRPC.InputFile file, final TLRPC.PhotoSize small, final TLRPC.PhotoSize big) { - Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_LONG).show(); + Toast.makeText(getParentActivity(), LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_SHORT).show(); /* AndroidUtilities.runOnUIThread(new Runnable() { @Override diff --git a/MessengerProj/src/main/java/com/b44t/ui/LaunchActivity.java b/MessengerProj/src/main/java/com/b44t/ui/LaunchActivity.java index abf31228d..630d90b48 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/LaunchActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/LaunchActivity.java @@ -659,7 +659,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa if( text == null ) { // added by MR, the Telegram-FOSS crashes on selecing an image in the gallery - why? - Toast.makeText(this, LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_LONG).show(); + Toast.makeText(this, LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_SHORT).show(); } else { String subject = intent.getStringExtra(Intent.EXTRA_SUBJECT); diff --git a/MessengerProj/src/main/java/com/b44t/ui/PhotoViewer.java b/MessengerProj/src/main/java/com/b44t/ui/PhotoViewer.java index d4947e208..e4836c7e9 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/PhotoViewer.java +++ b/MessengerProj/src/main/java/com/b44t/ui/PhotoViewer.java @@ -1136,10 +1136,10 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat switchToEditMode(2); } else if (id == gallery_menu_forward) { - Toast.makeText(parentActivity, LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_LONG).show(); + Toast.makeText(parentActivity, LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_SHORT).show(); } else if (id == gallery_menu_delete) { - Toast.makeText(parentActivity, LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_LONG).show(); + Toast.makeText(parentActivity, LocaleController.getString("NotYetImplemented", R.string.NotYetImplemented), Toast.LENGTH_SHORT).show(); /* if (parentActivity == null) { return; diff --git a/MessengerProj/src/main/java/com/b44t/ui/SettingsActivity.java b/MessengerProj/src/main/java/com/b44t/ui/SettingsActivity.java index 8940d1abf..67e70c884 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/SettingsActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/SettingsActivity.java @@ -125,7 +125,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter messagesSectionRow2 = rowCount++; textSizeRow = rowCount++; // incoming messages if (Build.VERSION.SDK_INT >= 23) { - directShareRow = rowCount++; + directShareRow = -1; // for now, seems not really to work, however, in T'gram it does } else { directShareRow = -1; @@ -133,7 +133,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter raiseToSpeakRow = rowCount++; // outgoing message sendByEnterRow = rowCount++; enableAnimationsRow = rowCount++; - cacheRow = rowCount++; + cacheRow = -1; // for now, the page is still reachable by the "storage settings" in the "android App Settings" supportSectionRow = rowCount++; supportSectionRow2 = rowCount++; aboutRow = rowCount++; @@ -457,7 +457,7 @@ 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), true); } else if (i == raiseToSpeakRow) {