From 009adc09bc3424ef7c48d3ed0dc29e6d5b2f3ab5 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 8 Mar 2017 13:57:18 +0100 Subject: [PATCH] Removed unneeded image search function, cleanup gallery code. --- .../b44t/messenger/SendMessagesHelper.java | 156 ------- .../b44t/ui/Cells/PhotoPickerAlbumsCell.java | 2 +- .../b44t/ui/Cells/PhotoPickerSearchCell.java | 163 ------- .../main/java/com/b44t/ui/ChatActivity.java | 11 +- .../com/b44t/ui/Components/AvatarUpdater.java | 10 +- .../com/b44t/ui/PhotoAlbumPickerActivity.java | 141 +------ .../java/com/b44t/ui/PhotoPickerActivity.java | 396 +----------------- .../src/main/res/drawable-hdpi/search_gif.png | Bin 1677 -> 0 bytes .../src/main/res/drawable-hdpi/search_web.png | Bin 1729 -> 0 bytes .../src/main/res/drawable-mdpi/search_gif.png | Bin 1430 -> 0 bytes .../src/main/res/drawable-mdpi/search_web.png | Bin 1459 -> 0 bytes .../main/res/drawable-xhdpi/search_gif.png | Bin 2015 -> 0 bytes .../main/res/drawable-xhdpi/search_web.png | Bin 2022 -> 0 bytes .../main/res/drawable-xxhdpi/search_gif.png | Bin 2592 -> 0 bytes .../main/res/drawable-xxhdpi/search_web.png | Bin 2586 -> 0 bytes .../src/main/res/values-de/strings.xml | 7 - .../src/main/res/values-es/strings.xml | 7 - .../src/main/res/values-fr/strings.xml | 7 - .../src/main/res/values-it/strings.xml | 7 - .../src/main/res/values-nl/strings.xml | 7 - .../src/main/res/values-pl/strings.xml | 7 - .../src/main/res/values-pt/strings.xml | 7 - MessengerProj/src/main/res/values/strings.xml | 7 - 23 files changed, 57 insertions(+), 878 deletions(-) delete mode 100644 MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoPickerSearchCell.java delete mode 100755 MessengerProj/src/main/res/drawable-hdpi/search_gif.png delete mode 100755 MessengerProj/src/main/res/drawable-hdpi/search_web.png delete mode 100755 MessengerProj/src/main/res/drawable-mdpi/search_gif.png delete mode 100755 MessengerProj/src/main/res/drawable-mdpi/search_web.png delete mode 100755 MessengerProj/src/main/res/drawable-xhdpi/search_gif.png delete mode 100755 MessengerProj/src/main/res/drawable-xhdpi/search_web.png delete mode 100755 MessengerProj/src/main/res/drawable-xxhdpi/search_gif.png delete mode 100755 MessengerProj/src/main/res/drawable-xxhdpi/search_web.png diff --git a/MessengerProj/src/main/java/com/b44t/messenger/SendMessagesHelper.java b/MessengerProj/src/main/java/com/b44t/messenger/SendMessagesHelper.java index ab2865b75..320325400 100644 --- a/MessengerProj/src/main/java/com/b44t/messenger/SendMessagesHelper.java +++ b/MessengerProj/src/main/java/com/b44t/messenger/SendMessagesHelper.java @@ -815,162 +815,6 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter prepareSendingPhotos(paths, uris, dialog_id, captions); } - public static void prepareSendingPhotosSearch(final ArrayList photos, final long dialog_id) { - if (photos == null || photos.isEmpty()) { - return; - } - new Thread(new Runnable() { - @Override - public void run() { - final boolean isEncrypted = false;//(int) dialog_id == 0; - for (int a = 0; a < photos.size(); a++) { - final MediaController.SearchImage searchImage = photos.get(a); - if (searchImage.type == 1) { - final HashMap params = new HashMap<>(); - TLRPC.TL_document document = null; - File cacheFile; - if (searchImage.document instanceof TLRPC.TL_document) { - document = (TLRPC.TL_document) searchImage.document; - cacheFile = FileLoader.getPathToAttach(document, true); - } else { - /*if (!isEncrypted)*/ { - TLRPC.Document doc = null;//(TLRPC.Document) MessagesStorage.getInstance().getSentFile(searchImage.imageUrl, !isEncrypted ? 1 : 4); - if (doc instanceof TLRPC.TL_document) { - document = (TLRPC.TL_document) doc; - } - } - String md5 = Utilities.MD5(searchImage.imageUrl) + "." + ImageLoader.getHttpUrlExtension(searchImage.imageUrl, "jpg"); - cacheFile = new File(FileLoader.getInstance().getDirectory(FileLoader.MEDIA_DIR_CACHE), md5); - } - if (document == null) { - if (searchImage.localUrl != null) { - params.put("url", searchImage.localUrl); - } - File thumbFile = null; - document = new TLRPC.TL_document(); - document.id = 0; - document.date = ConnectionsManager.getInstance().getCurrentTime(); - TLRPC.TL_documentAttributeFilename fileName = new TLRPC.TL_documentAttributeFilename(); - fileName.file_name = "animation.gif"; - document.attributes.add(fileName); - document.size = searchImage.size; - document.dc_id = 0; - if (cacheFile.toString().endsWith("mp4")) { - document.mime_type = "video/mp4"; - document.attributes.add(new TLRPC.TL_documentAttributeAnimated()); - } else { - document.mime_type = "image/gif"; - } - if (cacheFile.exists()) { - thumbFile = cacheFile; - } else { - cacheFile = null; - } - if (thumbFile == null) { - String thumb = Utilities.MD5(searchImage.thumbUrl) + "." + ImageLoader.getHttpUrlExtension(searchImage.thumbUrl, "jpg"); - thumbFile = new File(FileLoader.getInstance().getDirectory(FileLoader.MEDIA_DIR_CACHE), thumb); - if (!thumbFile.exists()) { - thumbFile = null; - } - } - if (thumbFile != null) { - try { - Bitmap bitmap; - if (thumbFile.getAbsolutePath().endsWith("mp4")) { - bitmap = ThumbnailUtils.createVideoThumbnail(thumbFile.getAbsolutePath(), MediaStore.Video.Thumbnails.MINI_KIND); - } else { - bitmap = ImageLoader.loadBitmap(thumbFile.getAbsolutePath(), null, 90, 90, true); - } - if (bitmap != null) { - document.thumb = ImageLoader.scaleAndSaveImage(bitmap, 90, 90, 55, isEncrypted); - bitmap.recycle(); - } - } catch (Exception e) { - FileLog.e("messenger", e); - } - } - if (document.thumb == null) { - document.thumb = new TLRPC.TL_photoSize(); - document.thumb.w = searchImage.width; - document.thumb.h = searchImage.height; - document.thumb.size = 0; - document.thumb.location = new TLRPC.TL_fileLocationUnavailable(); - document.thumb.type = "x"; - } - } - - if (searchImage.caption != null) { - document.caption = searchImage.caption.toString(); - } - final TLRPC.TL_document documentFinal = document; - final String originalPathFinal = searchImage.imageUrl; - final String pathFinal = cacheFile == null ? searchImage.imageUrl : cacheFile.toString(); - if (params != null && searchImage.imageUrl != null) { - params.put("originalPath", searchImage.imageUrl); - } - AndroidUtilities.runOnUIThread(new Runnable() { - @Override - public void run() { - SendMessagesHelper.getInstance().sendMessageDocument(documentFinal, null, pathFinal, dialog_id, params); - } - }); - } else { - boolean needDownloadHttp = true; - TLRPC.TL_photo photo = null; - /*if (!isEncrypted)*/ { - photo = null;//MessagesStorage.getInstance().getSentFile(searchImage.imageUrl, !isEncrypted ? 0 : 3); - } - if (photo == null) { - String md5 = Utilities.MD5(searchImage.imageUrl) + "." + ImageLoader.getHttpUrlExtension(searchImage.imageUrl, "jpg"); - File cacheFile = new File(FileLoader.getInstance().getDirectory(FileLoader.MEDIA_DIR_CACHE), md5); - if (cacheFile.exists() && cacheFile.length() != 0) { - photo = SendMessagesHelper.getInstance().generatePhotoSizes(cacheFile.toString(), null); - if (photo != null) { - needDownloadHttp = false; - } - } - if (photo == null) { - md5 = Utilities.MD5(searchImage.thumbUrl) + "." + ImageLoader.getHttpUrlExtension(searchImage.thumbUrl, "jpg"); - cacheFile = new File(FileLoader.getInstance().getDirectory(FileLoader.MEDIA_DIR_CACHE), md5); - if (cacheFile.exists()) { - photo = SendMessagesHelper.getInstance().generatePhotoSizes(cacheFile.toString(), null); - } - if (photo == null) { - photo = new TLRPC.TL_photo(); - photo.date = ConnectionsManager.getInstance().getCurrentTime(); - TLRPC.TL_photoSize photoSize = new TLRPC.TL_photoSize(); - photoSize.w = searchImage.width; - photoSize.h = searchImage.height; - photoSize.size = 0; - photoSize.location = new TLRPC.TL_fileLocationUnavailable(); - photoSize.type = "x"; - photo.sizes.add(photoSize); - } - } - } - if (photo != null) { - if (searchImage.caption != null) { - photo.caption = searchImage.caption.toString(); - } - final TLRPC.TL_photo photoFinal = photo; - final boolean needDownloadHttpFinal = needDownloadHttp; - final HashMap params = new HashMap<>(); - if (searchImage.imageUrl != null) { - params.put("originalPath", searchImage.imageUrl); - } - AndroidUtilities.runOnUIThread(new Runnable() { - @Override - public void run() { - SendMessagesHelper.getInstance().sendMessagePhoto(photoFinal, needDownloadHttpFinal ? searchImage.imageUrl : null, dialog_id, params); - } - }); - } - } - } - } - }).start(); - } - private static String getTrimmedString(String src) { String result = src.trim(); if (result.length() == 0) { diff --git a/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoPickerAlbumsCell.java b/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoPickerAlbumsCell.java index c35463dc4..cf8596cd5 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoPickerAlbumsCell.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoPickerAlbumsCell.java @@ -70,7 +70,7 @@ public class PhotoPickerAlbumsCell extends FrameLayout { addView(linearLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 28, Gravity.LEFT | Gravity.BOTTOM)); nameTextView = new TextView(context); - nameTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 13); + nameTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 15); nameTextView.setTextColor(0xffffffff); nameTextView.setSingleLine(true); nameTextView.setEllipsize(TextUtils.TruncateAt.END); diff --git a/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoPickerSearchCell.java b/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoPickerSearchCell.java deleted file mode 100644 index 2d4ab99a1..000000000 --- a/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoPickerSearchCell.java +++ /dev/null @@ -1,163 +0,0 @@ -/******************************************************************************* - * - * Messenger Android Frontend - * (C) 2013-2016 Nikolai Kudashov - * (C) 2017 Björn Petersen - * Contact: r10s@b44t.com, http://b44t.com - * - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see http://www.gnu.org/licenses/ . - * - ******************************************************************************/ - - -package com.b44t.ui.Cells; - -import android.content.Context; -import android.os.Build; -import android.text.TextUtils; -import android.util.TypedValue; -import android.view.Gravity; -import android.view.MotionEvent; -import android.view.View; -import android.widget.FrameLayout; -import android.widget.ImageView; -import android.widget.LinearLayout; -import android.widget.TextView; - -import com.b44t.messenger.AndroidUtilities; -import com.b44t.messenger.LocaleController; -import com.b44t.messenger.R; -import com.b44t.ui.Components.LayoutHelper; - -public class PhotoPickerSearchCell extends LinearLayout { - - public interface PhotoPickerSearchCellDelegate { - void didPressedSearchButton(int index); - } - - private class SearchButton extends FrameLayout { - - private TextView textView1; - private TextView textView2; - private ImageView imageView; - private View selector; - - public SearchButton(Context context) { - super(context); - - setBackgroundColor(0xff1a1a1a); - - selector = new View(context); - selector.setBackgroundResource(R.drawable.list_selector); - addView(selector, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT)); - - imageView = new ImageView(context); - imageView.setScaleType(ImageView.ScaleType.CENTER); - addView(imageView, LayoutHelper.createFrame(48, 48, Gravity.LEFT | Gravity.TOP)); - - textView1 = new TextView(context); - textView1.setGravity(Gravity.CENTER_VERTICAL); - textView1.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14); - textView1.setTextColor(0xffffffff); - textView1.setSingleLine(true); - textView1.setEllipsize(TextUtils.TruncateAt.END); - addView(textView1, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.LEFT, 51, 8, 4, 0)); - - textView2 = new TextView(context); - textView2.setGravity(Gravity.CENTER_VERTICAL); - textView2.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 10); - textView2.setTextColor(0xff666666); - textView2.setSingleLine(true); - textView2.setEllipsize(TextUtils.TruncateAt.END); - addView(textView2, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.LEFT, 51, 26, 4, 0)); - } - - @Override - public boolean onTouchEvent(MotionEvent event) { - if (Build.VERSION.SDK_INT >= 21) { - selector.drawableHotspotChanged(event.getX(), event.getY()); - } - return super.onTouchEvent(event); - } - } - - private PhotoPickerSearchCellDelegate delegate; - - public PhotoPickerSearchCell(Context context, boolean allowGifs) { - super(context); - setOrientation(HORIZONTAL); - - SearchButton searchButton = new SearchButton(context); - searchButton.textView1.setText(LocaleController.getString("SearchImages", R.string.SearchImages)); - searchButton.textView2.setText(LocaleController.getString("SearchImagesInfo", R.string.SearchImagesInfo)); - searchButton.imageView.setImageResource(R.drawable.search_web); - addView(searchButton); - LayoutParams layoutParams = (LayoutParams) searchButton.getLayoutParams(); - layoutParams.weight = 0.5f; - layoutParams.topMargin = AndroidUtilities.dp(4); - layoutParams.height = AndroidUtilities.dp(48); - layoutParams.width = 0; - searchButton.setLayoutParams(layoutParams); - searchButton.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - if (delegate != null) { - delegate.didPressedSearchButton(0); - } - } - }); - - FrameLayout frameLayout = new FrameLayout(context); - frameLayout.setBackgroundColor(0); - addView(frameLayout); - layoutParams = (LayoutParams) frameLayout.getLayoutParams(); - layoutParams.topMargin = AndroidUtilities.dp(4); - layoutParams.height = AndroidUtilities.dp(48); - layoutParams.width = AndroidUtilities.dp(4); - frameLayout.setLayoutParams(layoutParams); - - searchButton = new SearchButton(context); - searchButton.textView1.setText(LocaleController.getString("SearchGifs", R.string.SearchGifs)); - searchButton.textView2.setText("GIPHY"); - searchButton.imageView.setImageResource(R.drawable.search_gif); - addView(searchButton); - layoutParams = (LayoutParams) searchButton.getLayoutParams(); - layoutParams.weight = 0.5f; - layoutParams.topMargin = AndroidUtilities.dp(4); - layoutParams.height = AndroidUtilities.dp(48); - layoutParams.width = 0; - searchButton.setLayoutParams(layoutParams); - if (allowGifs) { - searchButton.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - if (delegate != null) { - delegate.didPressedSearchButton(1); - } - } - }); - } else { - searchButton.setAlpha(0.5f); - } - } - - public void setDelegate(PhotoPickerSearchCellDelegate delegate) { - this.delegate = delegate; - } - - @Override - protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(52), MeasureSpec.EXACTLY)); - } -} diff --git a/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java b/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java index 1df676911..9e007b082 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java @@ -1205,17 +1205,17 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not getParentActivity().requestPermissions(new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 4); return; } - PhotoAlbumPickerActivity fragment = new PhotoAlbumPickerActivity(false, true, ChatActivity.this); + PhotoAlbumPickerActivity fragment = new PhotoAlbumPickerActivity(false, ChatActivity.this); fragment.setDelegate(new PhotoAlbumPickerActivity.PhotoAlbumPickerActivityDelegate() { @Override - public void didSelectPhotos(ArrayList photos, ArrayList captions, ArrayList webPhotos) { + public void didSelectPhotos(ArrayList photos, ArrayList captions) { SendMessagesHelper.prepareSendingPhotos(photos, null, dialog_id, captions); - SendMessagesHelper.prepareSendingPhotosSearch(webPhotos, dialog_id); m_mrChat.cleanDraft(); } @Override public void startPhotoSelectActivity() { + /* -- this is the fallback implementation of the gallery selection, see ID_OPEN_SYSTEM_SELECTOR try { Intent videoPickerIntent = new Intent(); videoPickerIntent.setType("video/*"); @@ -1230,7 +1230,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not startActivityForResult(chooserIntent, RC1_CHAT_PICK); } catch (Exception e) { FileLog.e("messenger", e); - } + } */ } @Override @@ -1717,6 +1717,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not AndroidUtilities.addMediaToGallery(currentPicturePath); currentPicturePath = null; } else if (requestCode == RC1_CHAT_PICK) { + /* -- this is the fallback implementation of the gallery selection, see ID_OPEN_SYSTEM_SELECTOR if (data == null || data.getData() == null) { showAttachmentError(); return; @@ -1744,7 +1745,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not } else { SendMessagesHelper.prepareSendingPhoto(null, uri, dialog_id, null); } - m_mrChat.cleanDraft(); + m_mrChat.cleanDraft(); */ } else if (requestCode == RC2_CHAT_VIDEO_CAPTURE) { String videoPath = null; FileLog.d("messenger", "pic path " + currentPicturePath); diff --git a/MessengerProj/src/main/java/com/b44t/ui/Components/AvatarUpdater.java b/MessengerProj/src/main/java/com/b44t/ui/Components/AvatarUpdater.java index 826857ff0..ba5360a61 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Components/AvatarUpdater.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Components/AvatarUpdater.java @@ -97,10 +97,10 @@ public class AvatarUpdater implements NotificationCenter.NotificationCenterDeleg return; } } - PhotoAlbumPickerActivity fragment = new PhotoAlbumPickerActivity(true, false, null); + PhotoAlbumPickerActivity fragment = new PhotoAlbumPickerActivity(true, null); fragment.setDelegate(new PhotoAlbumPickerActivity.PhotoAlbumPickerActivityDelegate() { @Override - public void didSelectPhotos(ArrayList photos, ArrayList captions, ArrayList webPhotos) { + public void didSelectPhotos(ArrayList photos, ArrayList captions) { if (!photos.isEmpty()) { Bitmap bitmap = ImageLoader.loadBitmap(photos.get(0), null, 800, 800, true); processBitmap(bitmap); @@ -109,13 +109,14 @@ public class AvatarUpdater implements NotificationCenter.NotificationCenterDeleg @Override public void startPhotoSelectActivity() { + /* -- this is the fallback implementation of the gallery selection, see ID_OPEN_SYSTEM_SELECTOR try { Intent photoPickerIntent = new Intent(Intent.ACTION_GET_CONTENT); photoPickerIntent.setType("image/*"); parentFragment.startActivityForResult(photoPickerIntent, BaseFragment.RC14_AVATAR_GET_CONTENT); } catch (Exception e) { FileLog.e("messenger", e); - } + } */ } @Override @@ -189,10 +190,11 @@ public class AvatarUpdater implements NotificationCenter.NotificationCenterDeleg AndroidUtilities.addMediaToGallery(currentPicturePath); currentPicturePath = null; } else if (requestCode == BaseFragment.RC14_AVATAR_GET_CONTENT) { + /* -- this is the fallback implementation of the gallery selection, see ID_OPEN_SYSTEM_SELECTOR if (data == null || data.getData() == null) { return; } - startCrop(null, data.getData()); + startCrop(null, data.getData()); */ } } } diff --git a/MessengerProj/src/main/java/com/b44t/ui/PhotoAlbumPickerActivity.java b/MessengerProj/src/main/java/com/b44t/ui/PhotoAlbumPickerActivity.java index 36105ab6b..e7a791e47 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/PhotoAlbumPickerActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/PhotoAlbumPickerActivity.java @@ -54,7 +54,6 @@ import com.b44t.ui.ActionBar.BaseFragment; import com.b44t.ui.ActionBar.Theme; import com.b44t.ui.Adapters.BaseFragmentAdapter; import com.b44t.ui.Cells.PhotoPickerAlbumsCell; -import com.b44t.ui.Cells.PhotoPickerSearchCell; import com.b44t.ui.Components.LayoutHelper; import com.b44t.ui.Components.PickerBottomLayout; @@ -64,7 +63,7 @@ import java.util.HashMap; public class PhotoAlbumPickerActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate { public interface PhotoAlbumPickerActivityDelegate { - void didSelectPhotos(ArrayList photos, ArrayList captions, ArrayList webPhotos); + void didSelectPhotos(ArrayList photos, ArrayList captions); boolean didSelectVideo(String path); void startPhotoSelectActivity(); } @@ -72,11 +71,6 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati private ArrayList albumsSorted = null; private ArrayList videoAlbumsSorted = null; private HashMap selectedPhotos = new HashMap<>(); - private HashMap selectedWebPhotos = new HashMap<>(); - private HashMap recentImagesWebKeys = new HashMap<>(); - private HashMap recentImagesGifKeys = new HashMap<>(); - private ArrayList recentWebImages = new ArrayList<>(); - private ArrayList recentGifImages = new ArrayList<>(); private boolean loading = false; private int columnsCount = 2; @@ -89,7 +83,6 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati private PickerBottomLayout pickerBottomLayout; private boolean sendPressed; private boolean singlePhoto; - private boolean allowGifs; private final static int SELECTMODE0_PHOTOS = 0; private final static int SELECTMODE1_VIDEOS = 1; @@ -99,14 +92,14 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati private PhotoAlbumPickerActivityDelegate delegate; - private final static int item_photos = 2; - private final static int item_video = 3; + private final static int ID_OPEN_SYSTEM_SELECTOR = 1; + private final static int ID_ITEM_PHOTOS = 2; + private final static int ID_ITEM_VIDEO = 3; - public PhotoAlbumPickerActivity(boolean singlePhoto, boolean allowGifs, ChatActivity chatActivity) { + public PhotoAlbumPickerActivity(boolean singlePhoto, ChatActivity chatActivity) { super(); this.chatActivity = chatActivity; this.singlePhoto = singlePhoto; - this.allowGifs = allowGifs; } @Override @@ -114,7 +107,6 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati loading = true; MediaController.loadGalleryPhotosAlbums(classGuid); NotificationCenter.getInstance().addObserver(this, NotificationCenter.albumsDidLoaded); - NotificationCenter.getInstance().addObserver(this, NotificationCenter.recentImagesDidLoaded); NotificationCenter.getInstance().addObserver(this, NotificationCenter.closeChats); return super.onFragmentCreate(); } @@ -122,7 +114,6 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati @Override public void onFragmentDestroy() { NotificationCenter.getInstance().removeObserver(this, NotificationCenter.albumsDidLoaded); - NotificationCenter.getInstance().removeObserver(this, NotificationCenter.recentImagesDidLoaded); NotificationCenter.getInstance().removeObserver(this, NotificationCenter.closeChats); super.onFragmentDestroy(); } @@ -136,12 +127,12 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati public void onItemClick(int id) { if (id == -1) { finishFragment(); - } else if (id == 1) { + } else if (id == ID_OPEN_SYSTEM_SELECTOR) { if (delegate != null) { finishFragment(false); delegate.startPhotoSelectActivity(); } - } else if (id == item_photos) { + } else if (id == ID_ITEM_PHOTOS) { if (selectedMode == SELECTMODE0_PHOTOS) { return; } @@ -149,7 +140,7 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati dropDown.setText(LocaleController.getString("PickerPhotos", R.string.PickerPhotos)); emptyView.setText(LocaleController.getString("NoPhotos", R.string.NoPhotos)); listAdapter.notifyDataSetChanged(); - } else if (id == item_video) { + } else if (id == ID_ITEM_VIDEO) { if (selectedMode == SELECTMODE1_VIDEOS) { return; } @@ -162,7 +153,7 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati }); ActionBarMenu menu = actionBar.createMenu(); - menu.addItem(1, R.drawable.ic_ab_other); + //menu.addItem(ID_OPEN_SYSTEM_SELECTOR, R.drawable.ic_ab_other); -- fallback-selector not needed fragmentView = new FrameLayout(context); @@ -174,8 +165,8 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati dropDownContainer = new ActionBarMenuItem(context, menu, 0); dropDownContainer.setSubMenuOpenSide(1); - dropDownContainer.addSubItem(item_photos, LocaleController.getString("PickerPhotos", R.string.PickerPhotos), 0); - dropDownContainer.addSubItem(item_video, LocaleController.getString("PickerVideo", R.string.PickerVideo), 0); + dropDownContainer.addSubItem(ID_ITEM_PHOTOS, LocaleController.getString("PickerPhotos", R.string.PickerPhotos), 0); + dropDownContainer.addSubItem(ID_ITEM_VIDEO, LocaleController.getString("PickerVideo", R.string.PickerVideo), 0); actionBar.addView(dropDownContainer); FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) dropDownContainer.getLayoutParams(); layoutParams.height = LayoutHelper.MATCH_PARENT; @@ -296,7 +287,7 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati progressView.setVisibility(View.GONE); listView.setEmptyView(emptyView); } - pickerBottomLayout.updateSelectedCount(selectedPhotos.size() + selectedWebPhotos.size(), true); + pickerBottomLayout.updateSelectedCount(selectedPhotos.size(), true); View shadow = new View(context); shadow.setBackgroundResource(R.drawable.header_shadow_reverse); @@ -349,21 +340,6 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati } } else if (id == NotificationCenter.closeChats) { removeSelfFromStack(); - } else if (id == NotificationCenter.recentImagesDidLoaded) { - int type = (Integer) args[0]; - if (type == 0) { - recentWebImages = (ArrayList) args[1]; - recentImagesWebKeys.clear(); - for (MediaController.SearchImage searchImage : recentWebImages) { - recentImagesWebKeys.put(searchImage.id, searchImage); - } - } else if (type == 1) { - recentGifImages = (ArrayList) args[1]; - recentImagesGifKeys.clear(); - for (MediaController.SearchImage searchImage : recentGifImages) { - recentImagesGifKeys.put(searchImage.id, searchImage); - } - } } } @@ -372,7 +348,7 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati } private void sendSelectedPhotos() { - if (selectedPhotos.isEmpty() && selectedWebPhotos.isEmpty() || delegate == null || sendPressed) { + if (selectedPhotos.isEmpty() || delegate == null || sendPressed) { return; } sendPressed = true; @@ -388,47 +364,8 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati captions.add(photoEntry.caption != null ? photoEntry.caption.toString() : null); } } - ArrayList webPhotos = new ArrayList<>(); - boolean gifChanged = false; - boolean webChange = false; - for (HashMap.Entry entry : selectedWebPhotos.entrySet()) { - MediaController.SearchImage searchImage = entry.getValue(); - if (searchImage.imagePath != null) { - photos.add(searchImage.imagePath); - captions.add(searchImage.caption != null ? searchImage.caption.toString() : null); - } else { - webPhotos.add(searchImage); - } - searchImage.date = (int) (System.currentTimeMillis() / 1000); - if (searchImage.type == 0) { - webChange = true; - MediaController.SearchImage recentImage = recentImagesWebKeys.get(searchImage.id); - if (recentImage != null) { - recentWebImages.remove(recentImage); - recentWebImages.add(0, recentImage); - } else { - recentWebImages.add(0, searchImage); - } - } else if (searchImage.type == 1) { - gifChanged = true; - MediaController.SearchImage recentImage = recentImagesGifKeys.get(searchImage.id); - if (recentImage != null) { - recentGifImages.remove(recentImage); - recentGifImages.add(0, recentImage); - } else { - recentGifImages.add(0, searchImage); - } - } - } - if (webChange) { - //MessagesStorage.getInstance().putWebRecent(recentWebImages); - } - if (gifChanged) { - //MessagesStorage.getInstance().putWebRecent(recentGifImages); - } - - delegate.didSelectPhotos(photos, captions, webPhotos); + delegate.didSelectPhotos(photos, captions); } private void fixLayout() { @@ -475,21 +412,16 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati } } - private void openPhotoPicker(MediaController.AlbumEntry albumEntry, int type) { - ArrayList recentImages = null; - if (albumEntry == null) { - if (type == PhotoPickerActivity.TYPE0_SEARCH_IMAGES) { - recentImages = recentWebImages; - } else if (type == PhotoPickerActivity.TYPE1_SEARCH_GIF) { - recentImages = recentGifImages; - } + private void openPhotoPicker(MediaController.AlbumEntry albumEntry) { + if( albumEntry == null ) { + return; } - PhotoPickerActivity fragment = new PhotoPickerActivity(type, albumEntry, selectedPhotos, selectedWebPhotos, recentImages, singlePhoto, chatActivity); + PhotoPickerActivity fragment = new PhotoPickerActivity(albumEntry, selectedPhotos, singlePhoto, chatActivity); fragment.setDelegate(new PhotoPickerActivity.PhotoPickerActivityDelegate() { @Override public void selectedPhotosChanged() { if (pickerBottomLayout != null) { - pickerBottomLayout.updateSelectedCount(selectedPhotos.size() + selectedWebPhotos.size(), true); + pickerBottomLayout.updateSelectedCount(selectedPhotos.size(), true); } } @@ -530,10 +462,7 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati @Override public int getCount() { if (singlePhoto || selectedMode == SELECTMODE0_PHOTOS) { - if (singlePhoto) { - return albumsSorted != null ? (int) Math.ceil(albumsSorted.size() / (float) columnsCount) : 0; - } - return 1 + (albumsSorted != null ? (int) Math.ceil(albumsSorted.size() / (float) columnsCount) : 0); + return (albumsSorted != null ? (int) Math.ceil(albumsSorted.size() / (float) columnsCount) : 0); } else { return (videoAlbumsSorted != null ? (int) Math.ceil(videoAlbumsSorted.size() / (float) columnsCount) : 0); } @@ -565,7 +494,7 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati photoPickerAlbumsCell.setDelegate(new PhotoPickerAlbumsCell.PhotoPickerAlbumsCellDelegate() { @Override public void didSelectAlbum(MediaController.AlbumEntry albumEntry) { - openPhotoPicker(albumEntry, PhotoPickerActivity.TYPE0_SEARCH_IMAGES); + openPhotoPicker(albumEntry); } }); } else { @@ -573,12 +502,7 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati } photoPickerAlbumsCell.setAlbumsCount(columnsCount); for (int a = 0; a < columnsCount; a++) { - int index; - if (singlePhoto || selectedMode == SELECTMODE1_VIDEOS) { - index = i * columnsCount + a; - } else { - index = (i - 1) * columnsCount + a; - } + int index = i * columnsCount + a; if (singlePhoto || selectedMode == SELECTMODE0_PHOTOS) { if (index < albumsSorted.size()) { MediaController.AlbumEntry albumEntry = albumsSorted.get(index); @@ -596,37 +520,18 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati } } photoPickerAlbumsCell.requestLayout(); - } else if (type == 1) { - if (view == null) { - view = new PhotoPickerSearchCell(mContext, allowGifs); - ((PhotoPickerSearchCell) view).setDelegate(new PhotoPickerSearchCell.PhotoPickerSearchCellDelegate() { - @Override - public void didPressedSearchButton(int index) { - openPhotoPicker(null, index); - } - }); - } } return view; } @Override public int getItemViewType(int i) { - if (singlePhoto || selectedMode == SELECTMODE1_VIDEOS) { - return 0; - } - if (i == 0) { - return 1; - } return 0; } @Override public int getViewTypeCount() { - if (singlePhoto || selectedMode == SELECTMODE1_VIDEOS) { - return 1; - } - return 2; + return 1; } @Override diff --git a/MessengerProj/src/main/java/com/b44t/ui/PhotoPickerActivity.java b/MessengerProj/src/main/java/com/b44t/ui/PhotoPickerActivity.java index 1d52c7daf..a8ef9fef1 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/PhotoPickerActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/PhotoPickerActivity.java @@ -27,34 +27,25 @@ import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.view.Gravity; -import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.Surface; import android.view.View; import android.view.ViewGroup; import android.view.ViewTreeObserver; import android.view.WindowManager; -import android.widget.AbsListView; import android.widget.AdapterView; -import android.widget.EditText; import android.widget.FrameLayout; import android.widget.GridView; -import android.widget.ProgressBar; import android.widget.TextView; import com.b44t.messenger.AndroidUtilities; -import com.b44t.messenger.FileLoader; import com.b44t.messenger.LocaleController; import com.b44t.messenger.MediaController; import com.b44t.messenger.NotificationCenter; -import com.b44t.messenger.volley.RequestQueue; -import com.b44t.messenger.volley.toolbox.Volley; import com.b44t.messenger.ApplicationLoader; import com.b44t.messenger.R; import com.b44t.messenger.TLRPC; import com.b44t.messenger.MessageObject; -import com.b44t.ui.ActionBar.ActionBarMenu; -import com.b44t.ui.ActionBar.ActionBarMenuItem; import com.b44t.ui.ActionBar.Theme; import com.b44t.ui.Adapters.BaseFragmentAdapter; import com.b44t.ui.ActionBar.ActionBar; @@ -77,37 +68,13 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen boolean didSelectVideo(String path); } - private RequestQueue requestQueue; - - public final static int TYPE0_SEARCH_IMAGES = 0; - public final static int TYPE1_SEARCH_GIF = 1; - private int type; - - private HashMap selectedWebPhotos; private HashMap selectedPhotos; - private ArrayList recentImages; - - private ArrayList searchResult = new ArrayList<>(); - private HashMap searchResultKeys = new HashMap<>(); - private HashMap searchResultUrls = new HashMap<>(); - - private boolean searching; - private String nextSearchBingString; - private boolean giphySearchEndReached = true; - private String lastSearchString; - private boolean loadingRecent; - private int nextGiphySearchOffset; - private int giphyReqId; - private int lastSearchToken; private MediaController.AlbumEntry selectedAlbum; private GridView listView; private ListAdapter listAdapter; private PickerBottomLayout pickerBottomLayout; - private FrameLayout progressView; - private TextView emptyView; - private ActionBarMenuItem searchItem; private int itemWidth = 100; private boolean sendPressed; private boolean singlePhoto; @@ -115,16 +82,13 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen private PhotoPickerActivityDelegate delegate; - public PhotoPickerActivity(int type, MediaController.AlbumEntry selectedAlbum, HashMap selectedPhotos, HashMap selectedWebPhotos, ArrayList recentImages, boolean onlyOnePhoto, ChatActivity chatActivity) { + public PhotoPickerActivity(MediaController.AlbumEntry selectedAlbum, HashMap selectedPhotos, boolean onlyOnePhoto, ChatActivity chatActivity) { super(); - this.selectedAlbum = selectedAlbum; + this.selectedAlbum = selectedAlbum; // must never be null this.selectedPhotos = selectedPhotos; - this.selectedWebPhotos = selectedWebPhotos; - this.type = type; - this.recentImages = recentImages; this.singlePhoto = onlyOnePhoto; this.chatActivity = chatActivity; - if (selectedAlbum != null && selectedAlbum.isVideo) { + if (selectedAlbum.isVideo) { singlePhoto = true; } } @@ -132,25 +96,12 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen @Override public boolean onFragmentCreate() { NotificationCenter.getInstance().addObserver(this, NotificationCenter.closeChats); - NotificationCenter.getInstance().addObserver(this, NotificationCenter.recentImagesDidLoaded); - if (selectedAlbum == null) { - requestQueue = Volley.newRequestQueue(ApplicationLoader.applicationContext); - if (recentImages.isEmpty()) { - //MessagesStorage.getInstance().loadWebRecent(type); - loadingRecent = true; - } - } return super.onFragmentCreate(); } @Override public void onFragmentDestroy() { NotificationCenter.getInstance().removeObserver(this, NotificationCenter.closeChats); - NotificationCenter.getInstance().removeObserver(this, NotificationCenter.recentImagesDidLoaded); - if (requestQueue != null) { - requestQueue.cancelAll("search"); - requestQueue.stop(); - } super.onFragmentDestroy(); } @@ -158,13 +109,7 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen @Override public View createView(Context context) { actionBar.setBackButtonImage(R.drawable.ic_ab_back); - if (selectedAlbum != null) { - actionBar.setTitle(selectedAlbum.bucketName); - } else if (type == TYPE0_SEARCH_IMAGES) { - actionBar.setTitle(LocaleController.getString("SearchImagesTitle", R.string.SearchImagesTitle)); - } else if (type == TYPE1_SEARCH_GIF) { - actionBar.setTitle(LocaleController.getString("SearchGifsTitle", R.string.SearchGifsTitle)); - } + actionBar.setTitle(selectedAlbum.bucketName); actionBar.setActionBarMenuOnItemClick(new ActionBar.ActionBarMenuOnItemClick() { @Override public void onItemClick(int id) { @@ -174,36 +119,6 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen } }); - if (selectedAlbum == null) { - ActionBarMenu menu = actionBar.createMenu(); - searchItem = menu.addItem(0, R.drawable.ic_ab_search).setIsSearchField(true, false).setActionBarMenuItemSearchListener(new ActionBarMenuItem.ActionBarMenuItemSearchListener() { - @Override - public void onSearchExpand() { - - } - - @Override - public boolean canCollapseSearch() { - finishFragment(); - return false; - } - - @Override - public void onSearchPressed(EditText editText) { - // Telegram-FOSS doesn't support searching with external engines (privacy issues) - return; - } - }); - } - - if (selectedAlbum == null) { - if (type == TYPE0_SEARCH_IMAGES) { - searchItem.getSearchField().setHint(LocaleController.getString("SearchImagesTitle", R.string.SearchImagesTitle)); - } else if (type == TYPE1_SEARCH_GIF) { - searchItem.getSearchField().setHint(LocaleController.getString("SearchGifsTitle", R.string.SearchGifsTitle)); - } - } - fragmentView = new FrameLayout(context); FrameLayout frameLayout = (FrameLayout) fragmentView; @@ -231,7 +146,7 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView adapterView, View view, int i, long l) { - if (selectedAlbum != null && selectedAlbum.isVideo) { + if (selectedAlbum.isVideo) { if (i < 0 || i >= selectedAlbum.photos.size()) { return; } @@ -239,52 +154,23 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen finishFragment(); } } else { - ArrayList arrayList; - if (selectedAlbum != null) { - arrayList = (ArrayList) selectedAlbum.photos; - } else { - if (searchResult.isEmpty() && lastSearchString == null) { - arrayList = (ArrayList) recentImages; - } else { - arrayList = (ArrayList) searchResult; - } - } + ArrayList arrayList = (ArrayList) selectedAlbum.photos; if (i < 0 || i >= arrayList.size()) { return; } - if (searchItem != null) { - AndroidUtilities.hideKeyboard(searchItem.getSearchField()); - } PhotoViewer.getInstance().setParentActivity(getParentActivity()); PhotoViewer.getInstance().openPhotoForSelect(arrayList, i, singlePhoto ? 1 : 0, PhotoPickerActivity.this, chatActivity); } } }); - if (selectedAlbum == null) { - listView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() { - @Override - public boolean onItemLongClick(AdapterView parent, View view, int position, long id) { - // Telegram-FOSS doesn't support searching with external engines (privacy issues) - return false; - } - }); - } - - emptyView = new TextView(context); + TextView emptyView = new TextView(context); emptyView.setTextColor(0xff808080); emptyView.setTextSize(20); emptyView.setGravity(Gravity.CENTER); emptyView.setVisibility(View.GONE); - if (selectedAlbum != null) { - emptyView.setText(LocaleController.getString("NoPhotos", R.string.NoPhotos)); - } else { - if (type == TYPE0_SEARCH_IMAGES) { - emptyView.setText(LocaleController.getString("NoRecentPhotos", R.string.NoRecentPhotos)); - } else if (type == TYPE1_SEARCH_GIF) { - emptyView.setText(LocaleController.getString("NoRecentGIFs", R.string.NoRecentGIFs)); - } - } + emptyView.setText(LocaleController.getString("NoPhotos", R.string.NoPhotos)); + frameLayout.addView(emptyView); layoutParams = (FrameLayout.LayoutParams) emptyView.getLayoutParams(); layoutParams.width = LayoutHelper.MATCH_PARENT; @@ -298,42 +184,6 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen } }); - if (selectedAlbum == null) { - listView.setOnScrollListener(new AbsListView.OnScrollListener() { - @Override - public void onScrollStateChanged(AbsListView absListView, int i) { - if (i == SCROLL_STATE_TOUCH_SCROLL) { - AndroidUtilities.hideKeyboard(getParentActivity().getCurrentFocus()); - } - } - - @Override - public void onScroll(AbsListView absListView, int firstVisibleItem, int visibleItemCount, int totalItemCount) { - // Telegram-FOSS doesn't support searching with external engines (privacy issues) - return; - } - }); - - progressView = new FrameLayout(context); - progressView.setVisibility(View.GONE); - frameLayout.addView(progressView); - layoutParams = (FrameLayout.LayoutParams) progressView.getLayoutParams(); - layoutParams.width = LayoutHelper.MATCH_PARENT; - layoutParams.height = LayoutHelper.MATCH_PARENT; - layoutParams.bottomMargin = singlePhoto ? 0 : AndroidUtilities.dp(48); - progressView.setLayoutParams(layoutParams); - - ProgressBar progressBar = new ProgressBar(context); - progressView.addView(progressBar); - layoutParams = (FrameLayout.LayoutParams) progressBar.getLayoutParams(); - layoutParams.width = LayoutHelper.WRAP_CONTENT; - layoutParams.height = LayoutHelper.WRAP_CONTENT; - layoutParams.gravity = Gravity.CENTER; - progressBar.setLayoutParams(layoutParams); - - updateSearchInterface(); - } - pickerBottomLayout = new PickerBottomLayout(context, false); frameLayout.addView(pickerBottomLayout); layoutParams = (FrameLayout.LayoutParams) pickerBottomLayout.getLayoutParams(); @@ -359,7 +209,7 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen } listView.setEmptyView(emptyView); - pickerBottomLayout.updateSelectedCount(selectedPhotos.size() + selectedWebPhotos.size(), true); + pickerBottomLayout.updateSelectedCount(selectedPhotos.size(), true); View shadow = new View(context); shadow.setBackgroundResource(R.drawable.header_shadow_reverse); @@ -374,10 +224,6 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen if (listAdapter != null) { listAdapter.notifyDataSetChanged(); } - if (searchItem != null) { - searchItem.openSearch(true); - getParentActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); - } fixLayout(); } @@ -392,12 +238,6 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen public void didReceivedNotification(int id, Object... args) { if (id == NotificationCenter.closeChats) { removeSelfFromStack(); - } else if (id == NotificationCenter.recentImagesDidLoaded) { - if (selectedAlbum == null && type == (Integer) args[0]) { - recentImages = (ArrayList) args[1]; - loadingRecent = false; - updateSearchInterface(); - } } } @@ -409,21 +249,10 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen if (view instanceof PhotoPickerPhotoCell) { PhotoPickerPhotoCell cell = (PhotoPickerPhotoCell) view; int num = (Integer) cell.photoImage.getTag(); - if (selectedAlbum != null) { - if (num < 0 || num >= selectedAlbum.photos.size()) { - continue; - } - } else { - ArrayList array; - if (searchResult.isEmpty() && lastSearchString == null) { - array = recentImages; - } else { - array = searchResult; - } - if (num < 0 || num >= array.size()) { - continue; - } + if (num < 0 || num >= selectedAlbum.photos.size()) { + continue; } + if (num == index) { return cell; } @@ -455,7 +284,6 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen public void updatePhotoAtIndex(int index) { PhotoPickerPhotoCell cell = getCellForIndex(index); if (cell != null) { - if (selectedAlbum != null) { cell.photoImage.setOrientation(0, true); MediaController.PhotoEntry photoEntry = selectedAlbum.photos.get(index); if (photoEntry.thumbPath != null) { @@ -470,24 +298,6 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen } else { cell.photoImage.setImageResource(R.drawable.nophotos); } - } else { - ArrayList array; - if (searchResult.isEmpty() && lastSearchString == null) { - array = recentImages; - } else { - array = searchResult; - } - MediaController.SearchImage photoEntry = array.get(index); - if (photoEntry.document != null && photoEntry.document.thumb != null) { - cell.photoImage.setImage(photoEntry.document.thumb.location, null, cell.getContext().getResources().getDrawable(R.drawable.nophotos)); - } else if (photoEntry.thumbPath != null) { - cell.photoImage.setImage(photoEntry.thumbPath, null, cell.getContext().getResources().getDrawable(R.drawable.nophotos)); - } else if (photoEntry.thumbUrl != null && photoEntry.thumbUrl.length() > 0) { - cell.photoImage.setImage(photoEntry.thumbUrl, null, cell.getContext().getResources().getDrawable(R.drawable.nophotos)); - } else { - cell.photoImage.setImageResource(R.drawable.nophotos); - } - } } } @@ -510,21 +320,9 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen } PhotoPickerPhotoCell cell = (PhotoPickerPhotoCell) view; int num = (Integer) view.getTag(); - if (selectedAlbum != null) { if (num < 0 || num >= selectedAlbum.photos.size()) { continue; } - } else { - ArrayList array; - if (searchResult.isEmpty() && lastSearchString == null) { - array = recentImages; - } else { - array = searchResult; - } - if (num < 0 || num >= array.size()) { - continue; - } - } if (num == index) { cell.checkBox.setVisibility(View.VISIBLE); break; @@ -541,23 +339,12 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen @Override public boolean isPhotoChecked(int index) { - if (selectedAlbum != null) { return !(index < 0 || index >= selectedAlbum.photos.size()) && selectedPhotos.containsKey(selectedAlbum.photos.get(index).imageId); - } else { - ArrayList array; - if (searchResult.isEmpty() && lastSearchString == null) { - array = recentImages; - } else { - array = searchResult; - } - return !(index < 0 || index >= array.size()) && selectedWebPhotos.containsKey(array.get(index).id); - } } @Override public void setPhotoChecked(int index) { boolean add = true; - if (selectedAlbum != null) { if (index < 0 || index >= selectedAlbum.photos.size()) { return; } @@ -568,25 +355,6 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen } else { selectedPhotos.put(photoEntry.imageId, photoEntry); } - } else { - MediaController.SearchImage photoEntry; - ArrayList array; - if (searchResult.isEmpty() && lastSearchString == null) { - array = recentImages; - } else { - array = searchResult; - } - if (index < 0 || index >= array.size()) { - return; - } - photoEntry = array.get(index); - if (selectedWebPhotos.containsKey(photoEntry.id)) { - selectedWebPhotos.remove(photoEntry.id); - add = false; - } else { - selectedWebPhotos.put(photoEntry.id, photoEntry); - } - } int count = listView.getChildCount(); for (int a = 0; a < count; a++) { View view = listView.getChildAt(a); @@ -596,7 +364,7 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen break; } } - pickerBottomLayout.updateSelectedCount(selectedPhotos.size() + selectedWebPhotos.size(), true); + pickerBottomLayout.updateSelectedCount(selectedPhotos.size(), true); delegate.selectedPhotosChanged(); } @@ -609,7 +377,6 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen @Override public void sendButtonPressed(int index) { - if (selectedAlbum != null) { if (selectedPhotos.isEmpty()) { if (index < 0 || index >= selectedAlbum.photos.size()) { return; @@ -617,47 +384,12 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen MediaController.PhotoEntry photoEntry = selectedAlbum.photos.get(index); selectedPhotos.put(photoEntry.imageId, photoEntry); } - } else if (selectedPhotos.isEmpty()) { - ArrayList array; - if (searchResult.isEmpty() && lastSearchString == null) { - array = recentImages; - } else { - array = searchResult; - } - if (index < 0 || index >= array.size()) { - return; - } - MediaController.SearchImage photoEntry = array.get(index); - selectedWebPhotos.put(photoEntry.id, photoEntry); - } sendSelectedPhotos(); } @Override public int getSelectedCount() { - return selectedPhotos.size() + selectedWebPhotos.size(); - } - - @Override - public void onTransitionAnimationEnd(boolean isOpen, boolean backward) { - if (isOpen && searchItem != null) { - AndroidUtilities.showKeyboard(searchItem.getSearchField()); - } - } - - private void updateSearchInterface() { - if (listAdapter != null) { - listAdapter.notifyDataSetChanged(); - } - if (searching && searchResult.isEmpty() || loadingRecent && lastSearchString == null) { - progressView.setVisibility(View.VISIBLE); - listView.setEmptyView(null); - emptyView.setVisibility(View.GONE); - } else { - progressView.setVisibility(View.GONE); - emptyView.setVisibility(View.VISIBLE); - listView.setEmptyView(emptyView); - } + return selectedPhotos.size(); } public void setDelegate(PhotoPickerActivityDelegate delegate) { @@ -665,7 +397,7 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen } private void sendSelectedPhotos() { - if (selectedPhotos.isEmpty() && selectedWebPhotos.isEmpty() || delegate == null || sendPressed) { + if (selectedPhotos.isEmpty() || delegate == null || sendPressed) { return; } sendPressed = true; @@ -717,10 +449,6 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen listAdapter.notifyDataSetChanged(); listView.setSelection(position); - - if (selectedAlbum == null) { - emptyView.setPadding(0, 0, 0, (int) ((AndroidUtilities.displaySize.y - ActionBar.getCurrentActionBarHeight()) * 0.4f)); - } } private class ListAdapter extends BaseFragmentAdapter { @@ -732,32 +460,16 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen @Override public boolean areAllItemsEnabled() { - return selectedAlbum != null; + return true; } @Override public boolean isEnabled(int i) { - if (selectedAlbum == null) { - if (searchResult.isEmpty() && lastSearchString == null) { - return i < recentImages.size(); - } else { - return i < searchResult.size(); - } - } return true; } @Override public int getCount() { - if (selectedAlbum == null) { - if (searchResult.isEmpty() && lastSearchString == null) { - return recentImages.size(); - } else if (type == TYPE0_SEARCH_IMAGES) { - return searchResult.size() + (nextSearchBingString == null ? 0 : 1); - } else if (type == TYPE1_SEARCH_GIF) { - return searchResult.size() + (giphySearchEndReached ? 0 : 1); - } - } return selectedAlbum.photos.size(); } @@ -778,8 +490,6 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen @Override public View getView(int i, View view, ViewGroup viewGroup) { - int viewType = getItemViewType(i); - if (viewType == 0) { PhotoPickerPhotoCell cell = (PhotoPickerPhotoCell) view; if (view == null) { view = new PhotoPickerPhotoCell(mContext); @@ -788,7 +498,6 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen @Override public void onClick(View v) { int index = (Integer) ((View) v.getParent()).getTag(); - if (selectedAlbum != null) { MediaController.PhotoEntry photoEntry = selectedAlbum.photos.get(index); if (selectedPhotos.containsKey(photoEntry.imageId)) { selectedPhotos.remove(photoEntry.imageId); @@ -799,25 +508,7 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen selectedPhotos.put(photoEntry.imageId, photoEntry); } ((PhotoPickerPhotoCell) v.getParent()).setChecked(selectedPhotos.containsKey(photoEntry.imageId), true); - } else { - AndroidUtilities.hideKeyboard(getParentActivity().getCurrentFocus()); - MediaController.SearchImage photoEntry; - if (searchResult.isEmpty() && lastSearchString == null) { - photoEntry = recentImages.get((Integer) ((View) v.getParent()).getTag()); - } else { - photoEntry = searchResult.get((Integer) ((View) v.getParent()).getTag()); - } - if (selectedWebPhotos.containsKey(photoEntry.id)) { - selectedWebPhotos.remove(photoEntry.id); - photoEntry.imagePath = null; - photoEntry.thumbPath = null; - updatePhotoAtIndex(index); - } else { - selectedWebPhotos.put(photoEntry.id, photoEntry); - } - ((PhotoPickerPhotoCell) v.getParent()).setChecked(selectedWebPhotos.containsKey(photoEntry.id), true); - } - pickerBottomLayout.updateSelectedCount(selectedPhotos.size() + selectedWebPhotos.size(), true); + pickerBottomLayout.updateSelectedCount(selectedPhotos.size(), true); delegate.selectedPhotosChanged(); } }); @@ -830,7 +521,6 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen boolean showing; imageView.setOrientation(0, true); - if (selectedAlbum != null) { MediaController.PhotoEntry photoEntry = selectedAlbum.photos.get(i); if (photoEntry.thumbPath != null) { imageView.setImage(photoEntry.thumbPath, null, mContext.getResources().getDrawable(R.drawable.nophotos)); @@ -846,68 +536,24 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen } cell.setChecked(selectedPhotos.containsKey(photoEntry.imageId), false); showing = PhotoViewer.getInstance().isShowingImage(photoEntry.path); - } else { - MediaController.SearchImage photoEntry; - if (searchResult.isEmpty() && lastSearchString == null) { - photoEntry = recentImages.get(i); - } else { - photoEntry = searchResult.get(i); - } - if (photoEntry.thumbPath != null) { - imageView.setImage(photoEntry.thumbPath, null, mContext.getResources().getDrawable(R.drawable.nophotos)); - } else if (photoEntry.thumbUrl != null && photoEntry.thumbUrl.length() > 0) { - imageView.setImage(photoEntry.thumbUrl, null, mContext.getResources().getDrawable(R.drawable.nophotos)); - } else if (photoEntry.document != null && photoEntry.document.thumb != null) { - imageView.setImage(photoEntry.document.thumb.location, null, mContext.getResources().getDrawable(R.drawable.nophotos)); - } else { - imageView.setImageResource(R.drawable.nophotos); - } - cell.setChecked(selectedWebPhotos.containsKey(photoEntry.id), false); - if (photoEntry.document != null) { - showing = PhotoViewer.getInstance().isShowingImage(FileLoader.getPathToAttach(photoEntry.document, true).getAbsolutePath()); - } else { - showing = PhotoViewer.getInstance().isShowingImage(photoEntry.imageUrl); - } - } imageView.getImageReceiver().setVisible(!showing, true); cell.checkBox.setVisibility(singlePhoto || showing ? View.GONE : View.VISIBLE); - } else if (viewType == 1) { - if (view == null) { - LayoutInflater li = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); - view = li.inflate(R.layout.media_loading_layout, viewGroup, false); - } - ViewGroup.LayoutParams params = view.getLayoutParams(); - params.width = itemWidth; - params.height = itemWidth; - view.setLayoutParams(params); - } return view; } @Override public int getItemViewType(int i) { - if (selectedAlbum != null || searchResult.isEmpty() && lastSearchString == null && i < recentImages.size() || i < searchResult.size()) { - return 0; - } - return 1; + return 0; } @Override public int getViewTypeCount() { - return 2; + return 1; } @Override public boolean isEmpty() { - if (selectedAlbum != null) { - return selectedAlbum.photos.isEmpty(); - } else { - if (searchResult.isEmpty() && lastSearchString == null) { - return recentImages.isEmpty(); - } else { - return searchResult.isEmpty(); - } - } + return selectedAlbum.photos.isEmpty(); } } } diff --git a/MessengerProj/src/main/res/drawable-hdpi/search_gif.png b/MessengerProj/src/main/res/drawable-hdpi/search_gif.png deleted file mode 100755 index 3be94584aee0ff1b651a1c7aababfaeda14ce183..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1677 zcmeAS@N?(olHy`uVBq!ia0vp^sz9v5!3HGx4t-t*q$EpRBT9nv(@M${i&7aJQ}UBi z6+Ckj(^G>|6H_V+Po~;1Ffc1+hD4M^`1)8S=jZArg4F0$^BXQ!4Z zB&DWj=GiK}-@RW+Av48RDcsc8z_-9TH6zobswg$M$}c3jDm&RSMakYy!KT6rXh3di zNuokUZcbjYRfVk**jy_h8zii+qySb@l5ML5aa4qFfP!;=QL2Kep0RGSfuW&-nVFuU ziK&^Hp^k!)fuWJU0T7w#8k$&{npqi{D?ot~(6*wKG^-#NH>h1eo~=?wNlAf~zJ7Um zxn8-kUVc%!zM-Y1CCCgTBVC{h-Qvo;lEez#ykcdT2`;I{$wiq3C7Jno3Lp~`lk!VT zY?Xj6g?J&i0B&qvF*KNf0j6J(SfFpHX8`gNOrftYexnUy@&(kzb(T9Bihb5uTZsl3!k| z30CjxYvq|&T#}fVoa*Ufs{}MbFEca6%GA^Z7&ML+PR5o-hK8;tPKIu#mPRg)7H;Oo zCe9X?FugAM$)&lec_lEtDG0rmIQ4>(LT&-jW|!2W%(B!Jx1#)91+bT`GI6`b45xWe zy(zfeVvbXm3o@%2^X4vwwoqjz0e8^IiRE z(SfTEta!BMT3T!a&x^pCx&2zFSm$<4-aD;HBllFuyFR5?3zSx4T-*e#gdOy39mSGEfLyJX*C zr=Eg)9CC*D&QAIiefLY}=V!t<1tpiwkSyTLN#-hAQgMHm&&vjk==a zRj+y1lCmZ%oz9k+qxw}Qqq{QiYJ)nX^}XJz_q*5p*=%=MihFTj@z-4|qo+Ia$5wt0 zcx(08EtsM22LN2xtggPgIT_IO(=Q793gzkojc>i?nl!9 zc1HZ+*UdlvctKp>y|o(3$71CpEo&dMDL&%*Dl&(`_0*&U?qcPd(!wX}ZhGz8r8D_u z-~X#mRevnY)D}8e^*BVW#$#4OZ^V^}UWa^?r+Hg`&QB8YYrM_4|LkAy)@PN!uB^-n sH9I*`WB2=duH9Vw8l3-q-p|Ctpsi`Jd2XVf1E_-VboFyt=akR{0QdWT)c^nh diff --git a/MessengerProj/src/main/res/drawable-hdpi/search_web.png b/MessengerProj/src/main/res/drawable-hdpi/search_web.png deleted file mode 100755 index 900a5303b5c441d8ecda5953fe208a568a467e72..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1729 zcmeAS@N?(olHy`uVBq!ia0vp^sz9v5!3HGx4t-t*q$EpRBT9nv(@M${i&7aJQ}UBi z6+Ckj(^G>|6H_V+Po~;1Ffc1+hD4M^`1)8S=jZArg4F0$^BXQ!4Z zB&DWj=GiK}-@RW+Av48RDcsc8z_-9TH6zobswg$M$}c3jDm&RSMakYy!KT6rXh3di zNuokUZcbjYRfVk**jy_h8zii+qySb@l5ML5aa4qFfP!;=QL2Kep0RGSfuW&-nVFuU ziK&^Hp^k!)fuWJU0T7w#8k$&{npqi{D?ot~(6*wKG^-#NH>h1eo~=?wNlAf~zJ7Um zxn8-kUVc%!zM-Y1CCCgTBVC{h-Qvo;lEez#ykcdT2`;I{$wiq3C7Jno3Lp~`lk!VT zY?Xj6g?J&i0B&qvF*KNf0j6J(SfFpHX8`gNOrftYexnUy@&(kzb(T9Bihb5uTZsl3!k| z30CjxYvq|&T#}fVoa*Ufs{}MbFEca6%GAizz{T9u$jR8!$k5Q$#L2?Y$;rUU+05M7 z$k@=y5vJEAKe;qFHLnDwHwB^B7^hxPQpha;+U$~Alv$RV;#QQOs{r=0RVHq?7~nJy zsy79jv*Dd z_RR415Dk<#{{DsN)~0~0(8vh_PWr0its-vyOSg8*c}=|f)^TfRQ^s}XoJ1*+C4#nM zfp>f*1s!$YI11_YI9y)TK20_3%Y_eB%l}WzfAIKD@j07!J@S8c7(f4bw*H*u{h9A$ zPH%fV!(E%rbb*u(lWKz15B4@k{tCW#&1Da67PfH)>P=}}op9w_UTuQ>iSG~WnS)aq zGZ>P~3SKj=J|q;%WF^X9$ynB~bb-W^Cd~x12wuO&x|RN1GN;2rRv!9j9PsY&M>PYL zpBX$_S!@-`mbax+VjEN+tbFpiLLe}A(&SP`)gKMSUzz5vu$Xc3-Tus5u`J)0Y|{T?&GM{)Y5Mez zKr_Wn?A@FAyr=pe$=o92ojqsif#}0qcz(<{6c}~fuxg^FNue^2d5wNXxtAUvJslZ?fsU zS^X$d{6?wtY}v;LAF4&S%vDV1w3%^f!KG|F)kQDFU)R{GI9?43*|zKJL+R)28>ZjQ zXS}{C#yxxK`?(upZk?>1``gbuUv1eYtpgmYJnrko5`J2q?KqY$(s%1+MyimK(DvLZ zPj=1>n~`dBzZ8=2^d7{Bk~>UG_d_^P;>OrB&*c wzn-kjnbefBd;W{=pc|1Nn6Fqq{m&}FARYTSrpxf!98jg=>FVdQ&MBb@03=PCAOHXW diff --git a/MessengerProj/src/main/res/drawable-mdpi/search_gif.png b/MessengerProj/src/main/res/drawable-mdpi/search_gif.png deleted file mode 100755 index 5e8873fa78f1c094ddb4072f5da2b07b9a9bbeb1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1430 zcmeAS@N?(olHy`uVBq!ia0vp^l0YoM!3HGxw}u@936!`-lmzFem6RtIr7}3Cer{{GxPyLrY6bkQqisxQ#zd*q`*i1nqJTosPzr0uz ztlrnx$}_LHBrz{J)zigR321^|W@d_&rG=TPfw8NRld+|dp`ojZg^8PqvxSSJqm!eX znTv%5Os`9Ra%paAUI|QZ3PP_jPQ9R{kXrz>*(J3ovn(~mttdZN0qkX~Ox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GFa*a7{m{1{5Ubg_QG>hPh*e5B$1Z8`vh!6KP6{wT zcMR?He9{-zcz((e%h&ciuSA;rj|8f`kQUxIBPwU+zt>ittXyxTRwPHB>pZktu&iNM z*bl!|PPP7b*J|JJyyW=1`D^{BzFndGGR)~2>sN0Ke_;Jqh_w9KT5I(yvySpr)m$%vEr_cT5hutfGSiRb!={cvYJ#qT2X?FX& z_Un{YYn;?Mu~CxE`^Vza^u3F@9t1ScN$d6R{AI_j^hB#R@!@Wzq}`VGXaA+``S|>R z9&@$Vp0|o0nu~wml}cH^_mUu;x#z=|8SDxo0T&@{;ArhlwT9)*C=qh zdcOI+mu&T+cXB@n$%yacG)Rzr_*TPByg%SnLThMT<>|2bqT*(e@8&+)$+_*I?ep)A a49pBia(6W4)=E}@icwEjKbLh*2~7ZS)En*q diff --git a/MessengerProj/src/main/res/drawable-xhdpi/search_gif.png b/MessengerProj/src/main/res/drawable-xhdpi/search_gif.png deleted file mode 100755 index 5cd150ba38d30abf21d2a0ac3266e7dd1b399ddf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2015 zcmaJ?YfuyC8eS#gj^z>%_1G>8B63OCKthuyAh3i)1Tn+{qLPp-kVBG9lZ7M<1qoFt zpi(Z13SuodwARaj2ozE1aRkvSl(r+Ntte7juv|ncmTAw%3g`SdoSohMF7rIk`@Y}% z%zPim#zfj#ueAmMz)rwNgv1CFpTDI!@o()cYa@m=ctipoho#~=i3SBiWmpOd3Y3yG zRESDsh7WF{8~`wbVs6@| zLEvi$p23CwPAVZf77WKUD9E4&_(}a?7-TZ3a3F)pgndD}KTN0j6ED*b4rDW!YLpo~_RTR72S(FN)HImtZz^dK7#;opp-SZv zT8j(O|K$5Wg|#As8l?$QEtaW~5{*lBH-%EO!!@V`$21}gQ!JihY&wQx+H_0}hQ~2M zuXwpihUv7MUgM*q*#eaom#Czu0O3M}0#z=Tv0)?#VFd*7!U9-y7>)>Jh4UB@us;vx zg)vzyn6=17FlnX|RpE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2k zQx|oSMn)fm2L9OjV+pB$=3y1#U=P%0O&i!(6l-bi+uY$Jap}B&R^dOi8XGK|eDn~h z=RsC$uKu|*I$v-p?!e5tnveu>UktnEqf3L^?b==dckB;jVycdcq_r*MU)7(xe|PP{ zj!Tr*X_%HdwAY7xPb#*gYuLs2+>aZBPc4-uQj(Dmu7&?_L@%t@!FIOU-DmdZRvNSV zG8Ai9k1yf{lsjB2B7N6QydJaQ%6{ROCv}{^G#Ax+zXWGbUIasT?+s!!E!n+lMfxWd z9d3sXayc6Ysy{0qv}>7K&`V5V!kuL@gVeS?;OqQ!vf008m5sKLi%<8&KB6Ob^B>vw ovrhz-?MQssYW(cC$0rHqgt5TE#*axXSJR)D&l7U%gW~l60oBSdF8}}l diff --git a/MessengerProj/src/main/res/drawable-xxhdpi/search_gif.png b/MessengerProj/src/main/res/drawable-xxhdpi/search_gif.png deleted file mode 100755 index d9e7195be34b847cb066257f8baee880ddf71943..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2592 zcmaJ@dpy&7A75cYN-kv{9X})Cu-UNLq?xwyQ4$Vk)`SQ-o58Av@J^ zRHvc~y2v#oc|sT6NyqIx5=qZ=s`LEu^!#4G-|u^Qz2EQ8=kxu%|M+Hld%0_C8fiix z5N*(dL|2ZU%FkmNRQabFGLw}9OiT_CZ{tUbr3@h(LS*qH*Z|07M6u~?1}iDPmAwH1 zQGs)O0>lB-EqErMi(o8b5Q$uYk_~}uAS4PH%viPLkI}{per+hKCCu;HgwR$PFZ7JQeIQ?#0<>I^X**vA&g-Tm%ps42|5NIAqBKjl_ zybR&Q`I7ZZ#wz{1dkh_U>+%pm*`*6KeG|iVAKVX?$x*+eGPDqr=?n2x)h#dfEW1-N z00&3|x~YZ-=$DU|<}|4dQub(4BIF6T{5a2Mi~l{JnDnG@$GFYR<0-GHPj#ZF9fkbP zjv`#tSUYHOPX|PD@TSVK5%;o|r!R zq6v3M+K7I#iW7BB_n3OonwwV&rsU(4422A!`&;a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&!G)r$_Sc*#kp-+-0MKRq5xa zjdRJyt~Y|C52)rGxCkIW&$t`8Zdiyexy-n1gS2YoHMJoM~% z_q*k3F+R7!tpw=KS62mbDAk*NcPwlNW!I41d6A*3(;V|JAHSQ@|1vd=UOb_rB9zCs&|%yPtP4{(76d3xwmBfS zh!ulhTD|$wT1Cnk?uJL{2F;6T=q_zW4^a_&)sN6-7Q~V68N5P@Jw9@H%rK7?vQd)E z-@n~~+)(5`cD)Nav{dy`1}}3xYty$mZ4)0{d{OIz>ih|v8He*zxz-VqSH?hzBK0|y z@zlq^gtsybIZ9OCvp(lZSb_FFYh|)O|M*mgn`&%og>>ks$FDRzG&HAarEy@?@WpE5 zB6ovgZV93vwfvGSTYkO7=SZBlN*Q>CBmy6YjE0_tS5~Q0&JEN#Z_snlZZo<6Ynt$? zQ5#ZvqQ3srx`a7NwsxQHwxr6agnJyPyy-XswZb&MGlIlyt8lLi>XZj%zuWkxvHU@s zAYhK{oY6gUxaZuBB%-wvN4iT1kkhYFv;yzmk)$=+eW!Ov1#4nXA+S-o_$nxt6 zddTIEp348t@XoxSlxmWEF=y$xZf1Y-#;D%yWfSy=ZYrg zL+uBQ#y=+S8zZl{ItdNOgW9i6W3Xqhv`!TsIh1@YdXfN(nZv%E1F&2(r=#dgT_|?P za2}^8BzOnLy*b)+_P*9?y+u6+vcmU`wa*T4B5;MHKN9a$-TvsbtkI|OGGq7`;k_ar znsO3(ER%EU(~jwrw(KHK6%64&*}9PleT3Oo;&H*yR8YQWH|9a(%iwuI`4jzc+jRfN k2X=wowUq71%k#QskScjVN6<|F?80r$li@|L@Ca7^38>gWIRF3v diff --git a/MessengerProj/src/main/res/values-de/strings.xml b/MessengerProj/src/main/res/values-de/strings.xml index d50563cc0..9bdb92c34 100644 --- a/MessengerProj/src/main/res/values-de/strings.xml +++ b/MessengerProj/src/main/res/values-de/strings.xml @@ -177,13 +177,6 @@ Alle Videos Noch keine Bilder Noch keine Videos - Suchverlauf - Suchverlauf - BILDERSUCHE - BILDERSUCHE - GIF-SUCHE - Suche Bilder - Suche GIFs Bild zuschneiden Bild bearbeiten Verbessern diff --git a/MessengerProj/src/main/res/values-es/strings.xml b/MessengerProj/src/main/res/values-es/strings.xml index 8bf162499..15ca8f185 100644 --- a/MessengerProj/src/main/res/values-es/strings.xml +++ b/MessengerProj/src/main/res/values-es/strings.xml @@ -174,13 +174,6 @@ Todos los vídeos Aún sin fotos Sin vídeos aún - No hay fotos recientes - No hay GIF recientes - BUSCA FOTOS - BÚSQUEDA WEB - BUSCA GIF - Buscar foto - Buscar GIF Recortar imagen Editar imagen Realzar diff --git a/MessengerProj/src/main/res/values-fr/strings.xml b/MessengerProj/src/main/res/values-fr/strings.xml index ea10212a0..62dd783c7 100644 --- a/MessengerProj/src/main/res/values-fr/strings.xml +++ b/MessengerProj/src/main/res/values-fr/strings.xml @@ -172,13 +172,6 @@ Toutes les vidéos Aucune photo pour le moment Aucune vidéo pour le moement - Aucune photo récente - Aucun GIF récent - TROUVER LES IMAGES - RECHERCHER SUR LE WEB - TROUVER DES GIFS - Recherche sur le web - Rechercher des GIF Couper les images Modifier les images Améliorer diff --git a/MessengerProj/src/main/res/values-it/strings.xml b/MessengerProj/src/main/res/values-it/strings.xml index 5bfc30e6f..e2a54a0e9 100644 --- a/MessengerProj/src/main/res/values-it/strings.xml +++ b/MessengerProj/src/main/res/values-it/strings.xml @@ -174,13 +174,6 @@ Tutti i video Ancora nessuna foto Ancora nessun video - Nessuna foto recente - Nessuna GIF recente - CERCA IMMAGINI - RICERCA WEB - CERCA GIF - Cerca su web - Cerca GIF Ritaglia immagine Modifica immagine Migliora diff --git a/MessengerProj/src/main/res/values-nl/strings.xml b/MessengerProj/src/main/res/values-nl/strings.xml index 21d6536d8..2c95f22f1 100644 --- a/MessengerProj/src/main/res/values-nl/strings.xml +++ b/MessengerProj/src/main/res/values-nl/strings.xml @@ -174,13 +174,6 @@ Alle video\'s Nog geen foto\'s Nog geen video\'s - Niets recents - Niets recents - ONLINE ZOEKEN - ZOEK OP HET WEB - GIF\'S ZOEKEN - Online zoeken - GIF\'s zoeken Foto bijsnijden Foto bewerken Verbeteren diff --git a/MessengerProj/src/main/res/values-pl/strings.xml b/MessengerProj/src/main/res/values-pl/strings.xml index 3637cbd00..4ac1aa87a 100644 --- a/MessengerProj/src/main/res/values-pl/strings.xml +++ b/MessengerProj/src/main/res/values-pl/strings.xml @@ -177,13 +177,6 @@ Wszystkie wideo Nie ma zdjęć Nie ma jeszcze wideo - Nie ma wcześniejszych zdjęć - Nie ma wcześniejszych GIFów - SZUKAJ OBRAZY - W INTERNECIE - SZUKAJ GIFY - Przeszukaj internet - Szukaj GIFy Przytnij zdjęcie Edytuj zdjęcie Ulepszenie diff --git a/MessengerProj/src/main/res/values-pt/strings.xml b/MessengerProj/src/main/res/values-pt/strings.xml index ed3f35a85..64c159b8d 100644 --- a/MessengerProj/src/main/res/values-pt/strings.xml +++ b/MessengerProj/src/main/res/values-pt/strings.xml @@ -173,13 +173,6 @@ Todos os Vídeos Ainda não há fotos Nenhum vídeo ainda - Nenhuma foto recente - Nenhum GIF recente - BUSCAR IMAGENS - BUSCA GLOBAL - BUSCAR GIFS - Procurar na web - Procurar GIFs Recortar imagem Editar imagem Realçar diff --git a/MessengerProj/src/main/res/values/strings.xml b/MessengerProj/src/main/res/values/strings.xml index 44d1f2c69..baa31de5e 100644 --- a/MessengerProj/src/main/res/values/strings.xml +++ b/MessengerProj/src/main/res/values/strings.xml @@ -177,13 +177,6 @@ All Videos No photos yet No videos yet - No recent photos - No recent GIFs - FIND IMAGES - WEB SEARCH - FIND GIFS - Search web - Search GIFs Crop image Edit image Enhance