Bug fixes
This commit is contained in:
parent
69f8bb4f40
commit
1cda12c76a
@ -81,7 +81,7 @@ android {
|
||||
defaultConfig {
|
||||
minSdkVersion 8
|
||||
targetSdkVersion 19
|
||||
versionCode 247
|
||||
versionCode 248
|
||||
versionName "1.5.0"
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.os.Build;
|
||||
import android.provider.MediaStore;
|
||||
import android.util.Log;
|
||||
|
||||
import org.telegram.ui.ApplicationLoader;
|
||||
|
||||
@ -265,7 +266,7 @@ public class FileLoadOperation {
|
||||
}
|
||||
opts.inDither = false;
|
||||
if (mediaIdFinal != null) {
|
||||
image = MediaStore.Images.Thumbnails.getThumbnail(ApplicationLoader.applicationContext.getContentResolver(), mediaIdFinal, MediaStore.Images.Thumbnails.MINI_KIND, opts);
|
||||
image = MediaStore.Images.Thumbnails.getThumbnail(ApplicationLoader.applicationContext.getContentResolver(), mediaIdFinal, MediaStore.Images.Thumbnails.MINI_KIND, null);
|
||||
}
|
||||
if (image == null) {
|
||||
FileInputStream is = new FileInputStream(cacheFileFinal);
|
||||
@ -277,7 +278,7 @@ public class FileLoadOperation {
|
||||
cacheFileFinal.delete();
|
||||
}
|
||||
} else {
|
||||
if (filter != null && image != null) {
|
||||
if (filter != null) {
|
||||
float bitmapW = image.getWidth();
|
||||
float bitmapH = image.getHeight();
|
||||
if (bitmapW != w_filter && bitmapW > w_filter) {
|
||||
|
@ -1578,7 +1578,7 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
|
||||
}
|
||||
|
||||
public static void loadGalleryPhotosAlbums(final int guid) {
|
||||
Utilities.globalQueue.postRunnable(new Runnable() {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
final ArrayList<AlbumEntry> albumsSorted = new ArrayList<AlbumEntry>();
|
||||
@ -1606,6 +1606,10 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
|
||||
long dateTaken = cursor.getLong(dateColumn);
|
||||
int orientation = cursor.getInt(orientationColumn);
|
||||
|
||||
if (path == null || path.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
PhotoEntry photoEntry = new PhotoEntry(bucketId, imageId, dateTaken, path, orientation);
|
||||
|
||||
if (allPhotosAlbum == null) {
|
||||
@ -1650,6 +1654,6 @@ public class MediaController implements NotificationCenter.NotificationCenterDel
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ public class ChatAudioCell extends ChatBaseCell implements SeekBar.SeekBarDelega
|
||||
TAG = MediaController.getInstance().generateObserverTag();
|
||||
|
||||
avatarImage = new ImageReceiver();
|
||||
avatarImage.parentView = new WeakReference<View>(this);
|
||||
avatarImage.parentView = this;
|
||||
seekBar = new SeekBar(context);
|
||||
seekBar.delegate = this;
|
||||
progressView = new ProgressView();
|
||||
|
@ -20,7 +20,6 @@ import android.text.TextUtils;
|
||||
import android.view.HapticFeedbackConstants;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.SoundEffectConstants;
|
||||
import android.view.View;
|
||||
import android.view.ViewConfiguration;
|
||||
|
||||
import org.telegram.messenger.LocaleController;
|
||||
@ -31,8 +30,6 @@ import org.telegram.messenger.Utilities;
|
||||
import org.telegram.objects.MessageObject;
|
||||
import org.telegram.ui.Views.ImageReceiver;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
public class ChatBaseCell extends BaseCell {
|
||||
|
||||
public static interface ChatBaseCellDelegate {
|
||||
@ -149,7 +146,7 @@ public class ChatBaseCell extends BaseCell {
|
||||
init();
|
||||
media = isMedia;
|
||||
avatarImage = new ImageReceiver();
|
||||
avatarImage.parentView = new WeakReference<View>(this);
|
||||
avatarImage.parentView = this;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -102,7 +102,7 @@ public class ChatMediaCell extends ChatBaseCell implements MediaController.FileD
|
||||
TAG = MediaController.getInstance().generateObserverTag();
|
||||
|
||||
photoImage = new ImageReceiver();
|
||||
photoImage.parentView = new WeakReference<View>(this);
|
||||
photoImage.parentView = this;
|
||||
progressView = new ProgressView();
|
||||
progressView.setProgressColors(0x802a2a2a, 0xffffffff);
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ public class ChatOrUserCell extends BaseCell {
|
||||
|
||||
if (avatarImage == null) {
|
||||
avatarImage = new ImageReceiver();
|
||||
avatarImage.parentView = new WeakReference<View>(this);
|
||||
avatarImage.parentView = this;
|
||||
}
|
||||
|
||||
if (cellLayout == null) {
|
||||
|
@ -16,7 +16,6 @@ import android.text.Layout;
|
||||
import android.text.StaticLayout;
|
||||
import android.text.TextPaint;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import org.telegram.PhoneFormat.PhoneFormat;
|
||||
import org.telegram.messenger.LocaleController;
|
||||
@ -30,8 +29,6 @@ import org.telegram.messenger.Utilities;
|
||||
import org.telegram.objects.MessageObject;
|
||||
import org.telegram.ui.Views.ImageReceiver;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
public class DialogCell extends BaseCell {
|
||||
private static TextPaint namePaint;
|
||||
private static TextPaint nameEncryptedPaint;
|
||||
@ -134,7 +131,7 @@ public class DialogCell extends BaseCell {
|
||||
|
||||
if (avatarImage == null) {
|
||||
avatarImage = new ImageReceiver();
|
||||
avatarImage.parentView = new WeakReference<View>(this);
|
||||
avatarImage.parentView = this;
|
||||
}
|
||||
|
||||
if (cellLayout == null) {
|
||||
|
@ -450,18 +450,18 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
|
||||
Intent pickIntent = new Intent();
|
||||
pickIntent.setType("video/*");
|
||||
pickIntent.setAction(Intent.ACTION_GET_CONTENT);
|
||||
pickIntent.putExtra(MediaStore.EXTRA_SIZE_LIMIT, (long)(1024 * 1024 * 1000));
|
||||
pickIntent.putExtra(MediaStore.EXTRA_SIZE_LIMIT, (long) (1024 * 1024 * 1000));
|
||||
Intent takeVideoIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
|
||||
File video = Utilities.generateVideoPath();
|
||||
if (video != null) {
|
||||
if(android.os.Build.VERSION.SDK_INT > 16) {
|
||||
if (android.os.Build.VERSION.SDK_INT > 16) {
|
||||
takeVideoIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(video));
|
||||
}
|
||||
takeVideoIntent.putExtra(MediaStore.EXTRA_SIZE_LIMIT, (long)(1024 * 1024 * 1000));
|
||||
takeVideoIntent.putExtra(MediaStore.EXTRA_SIZE_LIMIT, (long) (1024 * 1024 * 1000));
|
||||
currentPicturePath = video.getAbsolutePath();
|
||||
}
|
||||
Intent chooserIntent = Intent.createChooser(pickIntent, "");
|
||||
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[] { takeVideoIntent });
|
||||
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[]{takeVideoIntent});
|
||||
|
||||
getParentActivity().startActivityForResult(chooserIntent, 2);
|
||||
} catch (Exception e) {
|
||||
@ -514,11 +514,11 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
|
||||
str += messageObject.messageOwner.message;
|
||||
}
|
||||
if (str.length() != 0) {
|
||||
if(android.os.Build.VERSION.SDK_INT < 11) {
|
||||
android.text.ClipboardManager clipboard = (android.text.ClipboardManager)ApplicationLoader.applicationContext.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
if (android.os.Build.VERSION.SDK_INT < 11) {
|
||||
android.text.ClipboardManager clipboard = (android.text.ClipboardManager) ApplicationLoader.applicationContext.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
clipboard.setText(str);
|
||||
} else {
|
||||
android.content.ClipboardManager clipboard = (android.content.ClipboardManager)ApplicationLoader.applicationContext.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
android.content.ClipboardManager clipboard = (android.content.ClipboardManager) ApplicationLoader.applicationContext.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
android.content.ClipData clip = android.content.ClipData.newPlainText("label", str);
|
||||
clipboard.setPrimaryClip(clip);
|
||||
}
|
||||
@ -1721,6 +1721,48 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
|
||||
}
|
||||
}
|
||||
|
||||
public void processSendingPhotos(ArrayList<String> paths, ArrayList<Uri> uris) {
|
||||
if (paths == null && uris == null || paths != null && paths.isEmpty() || uris != null && uris.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
final ArrayList<String> pathsCopy = new ArrayList<String>();
|
||||
final ArrayList<Uri> urisCopy = new ArrayList<Uri>();
|
||||
if (paths != null) {
|
||||
pathsCopy.addAll(paths);
|
||||
}
|
||||
if (uris != null) {
|
||||
urisCopy.addAll(uris);
|
||||
}
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
int count = !pathsCopy.isEmpty() ? pathsCopy.size() : urisCopy.size();
|
||||
String path = null;
|
||||
Uri uri = null;
|
||||
for (int a = 0; a < count; a++) {
|
||||
if (!pathsCopy.isEmpty()) {
|
||||
path = pathsCopy.get(a);
|
||||
} else if (!urisCopy.isEmpty()) {
|
||||
uri = urisCopy.get(a);
|
||||
}
|
||||
final TLRPC.TL_photo photo = MessagesController.getInstance().generatePhotoSizes(path, uri);
|
||||
Utilities.RunOnUIThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (photo != null) {
|
||||
MessagesController.getInstance().sendMessage(photo, dialog_id);
|
||||
if (chatListView != null) {
|
||||
chatListView.setSelection(messages.size() + 1);
|
||||
}
|
||||
scrollToTopOnResume = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
public void processSendingDocument(String documentFilePath) {
|
||||
if (documentFilePath == null || documentFilePath.length() == 0) {
|
||||
return;
|
||||
@ -2679,9 +2721,7 @@ public class ChatActivity extends BaseFragment implements SizeNotifierRelativeLa
|
||||
|
||||
@Override
|
||||
public void didSelectPhotos(ArrayList<String> photos) {
|
||||
for (String path : photos) {
|
||||
processSendingPhoto(path, null);
|
||||
}
|
||||
processSendingPhotos(photos, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -501,9 +501,7 @@ public class LaunchActivity extends ActionBarActivity implements NotificationCen
|
||||
fragment.processSendingDocument(documentPath);
|
||||
}
|
||||
if (imagesPathArray != null) {
|
||||
for (Uri path : imagesPathArray) {
|
||||
fragment.processSendingPhoto(null, path);
|
||||
}
|
||||
fragment.processSendingPhotos(null, imagesPathArray);
|
||||
}
|
||||
if (documentsPathArray != null) {
|
||||
for (String path : documentsPathArray) {
|
||||
|
@ -61,6 +61,7 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
|
||||
private TextView doneButtonTextView;
|
||||
private TextView doneButtonBadgeTextView;
|
||||
private int itemWidth = 100;
|
||||
private boolean sendPressed = false;
|
||||
|
||||
private PhotoPickerActivityDelegate delegate;
|
||||
|
||||
@ -162,7 +163,7 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
|
||||
}
|
||||
}
|
||||
});
|
||||
if (loading && albumsSorted != null && albumsSorted.isEmpty()) {
|
||||
if (loading && (albumsSorted == null || albumsSorted != null && albumsSorted.isEmpty())) {
|
||||
progressView.setVisibility(View.VISIBLE);
|
||||
listView.setEmptyView(null);
|
||||
} else {
|
||||
@ -213,6 +214,7 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
|
||||
if (listAdapter != null) {
|
||||
listAdapter.notifyDataSetChanged();
|
||||
}
|
||||
loading = false;
|
||||
}
|
||||
} else if (id == MessagesController.closeChats) {
|
||||
removeSelfFromStack();
|
||||
@ -351,9 +353,10 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
|
||||
}
|
||||
|
||||
private void sendSelectedPhotos() {
|
||||
if (selectedPhotos.isEmpty() || delegate == null) {
|
||||
if (selectedPhotos.isEmpty() || delegate == null || sendPressed) {
|
||||
return;
|
||||
}
|
||||
sendPressed = true;
|
||||
ArrayList<String> photos = new ArrayList<String>();
|
||||
for (HashMap.Entry<Integer, MediaController.PhotoEntry> entry : selectedPhotos.entrySet()) {
|
||||
MediaController.PhotoEntry photoEntry = entry.getValue();
|
||||
@ -385,6 +388,7 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
|
||||
if (getParentActivity() == null) {
|
||||
return;
|
||||
}
|
||||
int position = listView.getFirstVisiblePosition();
|
||||
WindowManager manager = (WindowManager)ApplicationLoader.applicationContext.getSystemService(Activity.WINDOW_SERVICE);
|
||||
int rotation = manager.getDefaultDisplay().getRotation();
|
||||
|
||||
@ -405,6 +409,7 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
|
||||
listView.setColumnWidth(itemWidth);
|
||||
|
||||
listAdapter.notifyDataSetChanged();
|
||||
listView.setSelection(position);
|
||||
}
|
||||
|
||||
private void updateSelectedCount() {
|
||||
@ -492,7 +497,7 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
|
||||
MediaController.AlbumEntry albumEntry = albumsSorted.get(i);
|
||||
BackupImageView imageView = (BackupImageView)view.findViewById(R.id.media_photo_image);
|
||||
if (albumEntry.coverPhoto != null && albumEntry.coverPhoto.path != null) {
|
||||
imageView.setImage("thumb://" + albumEntry.coverPhoto.imageId + ":" + albumEntry.coverPhoto.path, "150_150", R.drawable.nophotos);
|
||||
imageView.setImage("thumb://" + albumEntry.coverPhoto.imageId + ":" + albumEntry.coverPhoto.path, null, R.drawable.nophotos);
|
||||
} else {
|
||||
imageView.setImageResource(R.drawable.nophotos);
|
||||
}
|
||||
@ -509,7 +514,7 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
|
||||
if (view == null) {
|
||||
LayoutInflater li = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
view = li.inflate(R.layout.photo_picker_photo_layout, viewGroup, false);
|
||||
ImageView checkImageView = (ImageView)view.findViewById(R.id.photo_check);
|
||||
View checkImageView = view.findViewById(R.id.photo_check_frame);
|
||||
checkImageView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@ -534,7 +539,7 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
|
||||
imageView.setTag(i);
|
||||
view.setTag(i);
|
||||
if (photoEntry.path != null) {
|
||||
imageView.setImage("thumb://" + photoEntry.imageId + ":" + photoEntry.path, "100_100", R.drawable.nophotos);
|
||||
imageView.setImage("thumb://" + photoEntry.imageId + ":" + photoEntry.path, null, R.drawable.nophotos);
|
||||
} else {
|
||||
imageView.setImageResource(R.drawable.nophotos);
|
||||
}
|
||||
|
@ -66,7 +66,6 @@ import org.telegram.ui.Views.ClippingImageView;
|
||||
import org.telegram.ui.Views.ImageReceiver;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
@ -630,7 +629,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
||||
dateTextView.setLayoutParams(layoutParams);
|
||||
|
||||
pickerView = parentActivity.getLayoutInflater().inflate(R.layout.photo_picker_bottom_layout, null);
|
||||
bottomLayout.addView(pickerView);
|
||||
containerView.addView(pickerView);
|
||||
Button cancelButton = (Button)pickerView.findViewById(R.id.cancel_button);
|
||||
cancelButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@ -652,6 +651,12 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
||||
}
|
||||
});
|
||||
|
||||
layoutParams = (FrameLayout.LayoutParams)pickerView.getLayoutParams();
|
||||
layoutParams.width = FrameLayout.LayoutParams.MATCH_PARENT;
|
||||
layoutParams.height = Utilities.dp(48);
|
||||
layoutParams.gravity = Gravity.BOTTOM;
|
||||
pickerView.setLayoutParams(layoutParams);
|
||||
|
||||
cancelButton.setText(LocaleController.getString("Cancel", R.string.Cancel).toUpperCase());
|
||||
doneButtonTextView = (TextView)doneButton.findViewById(R.id.done_button_text);
|
||||
doneButtonTextView.setText(LocaleController.getString("Send", R.string.Send).toUpperCase());
|
||||
@ -674,9 +679,9 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
||||
gestureDetector = new GestureDetector(containerView.getContext(), this);
|
||||
gestureDetector.setOnDoubleTapListener(this);
|
||||
|
||||
centerImage.parentView = new WeakReference<View>(containerView);
|
||||
leftImage.parentView = new WeakReference<View>(containerView);
|
||||
rightImage.parentView = new WeakReference<View>(containerView);
|
||||
centerImage.parentView = containerView;
|
||||
leftImage.parentView = containerView;
|
||||
rightImage.parentView = containerView;
|
||||
|
||||
currentOverlay = new OverlayView(containerView.getContext());
|
||||
containerView.addView(currentOverlay);
|
||||
@ -1075,6 +1080,8 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
||||
imagesArrLocals.addAll(photos);
|
||||
setImageIndex(index, true);
|
||||
pickerView.setVisibility(View.VISIBLE);
|
||||
bottomLayout.setVisibility(View.GONE);
|
||||
canShowBottom = false;
|
||||
updateSelectedCount();
|
||||
}
|
||||
|
||||
@ -1456,6 +1463,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
||||
velocityTracker.recycle();
|
||||
velocityTracker = null;
|
||||
}
|
||||
ConnectionsManager.getInstance().cancelRpcsForClassGuid(classGuid);
|
||||
|
||||
final PlaceProviderObject object = placeProvider.getPlaceForPhoto(currentMessageObject, currentFileLocation, currentIndex);
|
||||
|
||||
@ -1464,6 +1472,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
||||
|
||||
animationInProgress = 1;
|
||||
animatingImageView.setVisibility(View.VISIBLE);
|
||||
containerView.invalidate();
|
||||
|
||||
AnimatorSet animatorSet = new AnimatorSet();
|
||||
|
||||
|
@ -41,7 +41,7 @@ public class BackupImageView extends View {
|
||||
|
||||
private void init() {
|
||||
imageReceiver = new ImageReceiver();
|
||||
imageReceiver.parentView = new WeakReference<View>(this);
|
||||
imageReceiver.parentView = this;
|
||||
}
|
||||
|
||||
public void setImage(TLRPC.FileLocation path, String filter, int placeholder) {
|
||||
@ -98,31 +98,4 @@ public class BackupImageView extends View {
|
||||
imageReceiver.imageH = getHeight();
|
||||
imageReceiver.draw(canvas, 0, 0, imageReceiver.imageW, imageReceiver.imageH);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
public void setImageResourceMy(int resId) {
|
||||
if (ignoreLayout) {
|
||||
makeRequest = false;
|
||||
}
|
||||
super.setImageResource(resId);
|
||||
if (ignoreLayout) {
|
||||
makeRequest = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setImageBitmapMy(Bitmap bitmap) {
|
||||
if (ignoreLayout) {
|
||||
makeRequest = false;
|
||||
}
|
||||
super.setImageBitmap(bitmap);
|
||||
if (ignoreLayout) {
|
||||
makeRequest = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
*/
|
||||
}
|
||||
|
@ -21,8 +21,6 @@ import org.telegram.messenger.FileLoader;
|
||||
import org.telegram.messenger.FileLog;
|
||||
import org.telegram.messenger.Utilities;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
public class ImageReceiver {
|
||||
private TLRPC.FileLocation last_path = null;
|
||||
private String last_httpUrl = null;
|
||||
@ -33,7 +31,7 @@ public class ImageReceiver {
|
||||
private boolean isPlaceholder = false;
|
||||
private Drawable currentImage = null;
|
||||
public Integer TAG = null;
|
||||
public WeakReference<View> parentView = null;
|
||||
public View parentView = null;
|
||||
public int imageX = 0, imageY = 0, imageW = 0, imageH = 0;
|
||||
public Rect drawRegion = new Rect();
|
||||
private boolean isVisible = true;
|
||||
@ -94,10 +92,16 @@ public class ImageReceiver {
|
||||
if (img == null) {
|
||||
isPlaceholder = true;
|
||||
FileLoader.getInstance().loadImage(path, httpUrl, this, filter, true, size);
|
||||
if (parentView != null) {
|
||||
parentView.invalidate();
|
||||
}
|
||||
} else {
|
||||
selfSetting = true;
|
||||
setImageBitmap(img, currentPath);
|
||||
selfSetting = false;
|
||||
if (parentView != null) {
|
||||
parentView.invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -108,12 +112,8 @@ public class ImageReceiver {
|
||||
isPlaceholder = false;
|
||||
FileLoader.getInstance().incrementUseCount(currentPath);
|
||||
currentImage = new BitmapDrawable(null, bitmap);
|
||||
if (!selfSetting && parentView != null && parentView.get() != null) {
|
||||
if (imageW != 0) {
|
||||
parentView.get().invalidate(imageX, imageY, imageX + imageW, imageY + imageH);
|
||||
} else {
|
||||
parentView.get().invalidate();
|
||||
}
|
||||
if (!selfSetting && parentView != null) {
|
||||
parentView.invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
@ -246,11 +246,8 @@ public class ImageReceiver {
|
||||
return;
|
||||
}
|
||||
isVisible = value;
|
||||
if (invalidate) {
|
||||
View parent = parentView.get();
|
||||
if (parent != null) {
|
||||
parent.invalidate();
|
||||
}
|
||||
if (invalidate && parentView != null) {
|
||||
parentView.invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,13 +14,21 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:id="@+id/photo_frame"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="30dp"
|
||||
android:id="@+id/photo_check"
|
||||
<FrameLayout
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginTop="2dp"
|
||||
android:scaleType="center"
|
||||
android:layout_marginRight="2dp"/>
|
||||
android:id="@+id/photo_check_frame">
|
||||
|
||||
<ImageView
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="30dp"
|
||||
android:id="@+id/photo_check"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginTop="2dp"
|
||||
android:scaleType="center"
|
||||
android:layout_marginRight="2dp"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</FrameLayout>
|
@ -294,6 +294,7 @@
|
||||
<string name="Gallery">الألبوم</string>
|
||||
<string name="AllPhotos">All Photos</string>
|
||||
<string name="NoPhotos">No photos yet</string>
|
||||
<string name="SendingPhotos">Sending photos... %1$d of %2$d</string>
|
||||
|
||||
<!--button titles-->
|
||||
<string name="Next">التالي</string>
|
||||
|
@ -294,6 +294,7 @@
|
||||
<string name="Gallery">Galerie</string>
|
||||
<string name="AllPhotos">All Photos</string>
|
||||
<string name="NoPhotos">No photos yet</string>
|
||||
<string name="SendingPhotos">Sending photos... %1$d of %2$d</string>
|
||||
|
||||
<!--button titles-->
|
||||
<string name="Next">Weiter</string>
|
||||
|
@ -94,7 +94,7 @@
|
||||
<string name="Message">Mensaje</string>
|
||||
<string name="TypeMessage">Escribe un mensaje</string>
|
||||
<string name="DOWNLOAD">Descargar</string>
|
||||
<string name="Selected">Elegidos: %d</string>
|
||||
<string name="Selected">Seleccionado: %d</string>
|
||||
<string name="ShareMyContactInfo">COMPARTIR MI INFORMACIÓN DE CONTACTO</string>
|
||||
<string name="AddToContacts">AÑADIR A CONTACTOS</string>
|
||||
<string name="EncryptedPlaceholderTitleIncoming">%s te ha invitado a un chat secreto.</string>
|
||||
@ -112,7 +112,7 @@
|
||||
<string name="DeleteThisChat">Eliminar esta conversación</string>
|
||||
<string name="SlideToCancel">DESLIZA PARA CANCELAR</string>
|
||||
<string name="SaveToDownloads">Guardar en descargas</string>
|
||||
<string name="ApplyLocalizationFile">Aplicar fichero de localización</string>
|
||||
<string name="ApplyLocalizationFile">Aplicar archivo de traducción</string>
|
||||
|
||||
<!--notification-->
|
||||
<string name="EncryptedChatRequested">Chat secreto solicitado</string>
|
||||
@ -247,7 +247,7 @@
|
||||
<string name="Support">SOPORTE</string>
|
||||
<string name="ChatBackground">Fondo de chat</string>
|
||||
<string name="MessagesSettings">MENSAJES</string>
|
||||
<string name="SendByEnter">Enviar con ‘Enter’</string>
|
||||
<string name="SendByEnter">Enviar con \'Intro\'</string>
|
||||
<string name="TerminateAllSessions">Cerrar todas las otras sesiones</string>
|
||||
<string name="AutomaticPhotoDownload">DESCARGA AUTOMÁTICA DE FOTOS</string>
|
||||
<string name="AutomaticAudioDownload">DESCARGA AUTOMÁTICA DE AUDIO</string>
|
||||
@ -257,12 +257,12 @@
|
||||
<string name="ContactJoined">Un contacto se unió a Telegram</string>
|
||||
<string name="Pebble">PEBBLE</string>
|
||||
<string name="Language">Idioma</string>
|
||||
<string name="AskAQuestionInfo">Por favor, ten en cuenta que el Soporte de Telegram está hecho por voluntarios. Intentamos responder lo antes posible, pero puede tomar un tiempo.<![CDATA[<br><br>]]>Por favor, echa un vistazo a las <![CDATA[<a href=“http://telegram.org/faq/es”>Preguntas Frecuentes de Telegram</a>]]>: tiene importantes <![CDATA[<a href=“http://telegram.org/faq/es#solucin-de-problemas”>Soluciones a problemas</a>]]> y respuestas para la mayoría de las preguntas.</string>
|
||||
<string name="AskAQuestionInfo">Por favor, ten en cuenta que el Soporte de Telegram está hecho por voluntarios. Intentamos responder lo antes posible, pero puede tomar un tiempo.<![CDATA[<br><br>]]>Por favor, echa un vistazo a las <![CDATA[<a href=“http://telegram.org/faq/es”>Preguntas Frecuentes de Telegram</a>]]>: tienen importantes <![CDATA[<a href=“http://telegram.org/faq/es#solucin-de-problemas”>soluciones a problemas</a>]]> y respuestas para la mayoría de las preguntas.</string>
|
||||
<string name="AskButton">Preguntar</string>
|
||||
<string name="TelegramFaq">Preguntas frecuentes</string>
|
||||
<string name="TelegramFaqUrl">https://telegram.org/faq/es</string>
|
||||
<string name="DeleteLocalization">¿Eliminar localización?</string>
|
||||
<string name="IncorrectLocalization">Fichero de localización incorrecto</string>
|
||||
<string name="DeleteLocalization">¿Eliminar traducción?</string>
|
||||
<string name="IncorrectLocalization">Archivo de traducción incorrecto</string>
|
||||
<string name="Enabled">Activado</string>
|
||||
<string name="Disabled">Desactivado</string>
|
||||
<string name="NotificationsService">Servicio de notificaciones</string>
|
||||
@ -294,6 +294,7 @@
|
||||
<string name="Gallery">Galería</string>
|
||||
<string name="AllPhotos">All Photos</string>
|
||||
<string name="NoPhotos">No photos yet</string>
|
||||
<string name="SendingPhotos">Sending photos... %1$d of %2$d</string>
|
||||
|
||||
<!--button titles-->
|
||||
<string name="Next">Siguiente</string>
|
||||
@ -333,7 +334,7 @@
|
||||
<string name="ActionYouCreateGroup">Creaste el grupo</string>
|
||||
<string name="ActionKickUserYou">un1 te expulsó</string>
|
||||
<string name="ActionAddUserYou">un1 te añadió</string>
|
||||
<string name="UnsuppotedMedia">Este mensaje no está soportado en tu versión de Telegram.</string>
|
||||
<string name="UnsuppotedMedia">Este mensaje no lo admite tu versión de Telegram. Actualiza la app para verlo: http://telegram.org/update</string>
|
||||
<string name="AttachPhoto">Foto</string>
|
||||
<string name="AttachVideo">Vídeo</string>
|
||||
<string name="AttachLocation">Ubicación</string>
|
||||
@ -370,12 +371,12 @@
|
||||
<string name="Page6Title">Basada en la nube</string>
|
||||
<string name="Page7Title">Privada</string>
|
||||
<string name="Page1Message">Bienvenidos a la era de la mensajería rápida y segura.</string>
|
||||
<string name="Page2Message"><![CDATA[<b>Telegram</b>]]> entrega mensajes más rápido que cualquier otra aplicación.</string>
|
||||
<string name="Page3Message"><![CDATA[<b>Telegram</b>]]> es gratis para siempre. Sin publicidad. Sin cuotas de suscripción.</string>
|
||||
<string name="Page4Message"><![CDATA[<b>Telegram</b>]]> mantiene tus mensajes a salvo del ataque de hackers.</string>
|
||||
<string name="Page5Message"><![CDATA[<b>Telegram</b>]]> no tiene límites en el tamaño de tus chats y archivos.</string>
|
||||
<string name="Page6Message"><![CDATA[<b>Telegram</b>]]> te permite acceder a tus mensajes desde múltiples dispositivos.</string>
|
||||
<string name="Page7Message">Los mensajes de <![CDATA[<b>Telegram</b>]]> están fuertemente cifrados y se pueden autodestruir.</string>
|
||||
<string name="Page2Message"><![CDATA[<b>Telegram</b>]]> entrega mensajes más rápido que<![CDATA[<br/>]]>cualquier otra aplicación.</string>
|
||||
<string name="Page3Message"><![CDATA[<b>Telegram</b>]]> es gratis para siempre. Sin publicidad.<![CDATA[<br/>]]>Sin cuotas de suscripción.</string>
|
||||
<string name="Page4Message"><![CDATA[<b>Telegram</b>]]> mantiene tus mensajes<![CDATA[<br/>]]>a salvo del ataque de hackers.</string>
|
||||
<string name="Page5Message"><![CDATA[<b>Telegram</b>]]> no tiene límites en el tamaño de tus<![CDATA[<br/>]]>chats y archivos.</string>
|
||||
<string name="Page6Message"><![CDATA[<b>Telegram</b>]]> te permite acceder a tus mensajes<![CDATA[<br/>]]>desde múltiples dispositivos.</string>
|
||||
<string name="Page7Message">Los mensajes de <![CDATA[<b>Telegram</b>]]> están fuertemente<![CDATA[<br/>]]>cifrados y se pueden autodestruir.</string>
|
||||
<string name="StartMessaging">Empieza a conversar</string>
|
||||
|
||||
<!--Don't change this! Not for localization!-->
|
||||
|
@ -294,6 +294,7 @@
|
||||
<string name="Gallery">Galleria</string>
|
||||
<string name="AllPhotos">All Photos</string>
|
||||
<string name="NoPhotos">No photos yet</string>
|
||||
<string name="SendingPhotos">Sending photos... %1$d of %2$d</string>
|
||||
|
||||
<!--button titles-->
|
||||
<string name="Next">Avanti</string>
|
||||
|
@ -294,6 +294,7 @@
|
||||
<string name="Gallery">Galerij</string>
|
||||
<string name="AllPhotos">All Photos</string>
|
||||
<string name="NoPhotos">No photos yet</string>
|
||||
<string name="SendingPhotos">Sending photos... %1$d of %2$d</string>
|
||||
|
||||
<!--button titles-->
|
||||
<string name="Next">Volgende</string>
|
||||
|
@ -294,6 +294,7 @@
|
||||
<string name="Gallery">Gallery</string>
|
||||
<string name="AllPhotos">All Photos</string>
|
||||
<string name="NoPhotos">No photos yet</string>
|
||||
<string name="SendingPhotos">Sending photos... %1$d of %2$d</string>
|
||||
|
||||
<!--button titles-->
|
||||
<string name="Next">Next</string>
|
||||
|
Loading…
Reference in New Issue
Block a user