sync original

This commit is contained in:
wrwrabbit 2022-01-19 16:03:57 +03:00
commit 1a6d05d4f8
31 changed files with 1303 additions and 258 deletions

View file

@ -565,7 +565,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
}
public void setCaption(CharSequence caption) {
hasCaptionForAllMedia = !TextUtils.isEmpty(caption);
hasCaptionForAllMedia = true;//!TextUtils.isEmpty(caption);
captionForAllMedia = caption;
}
@ -1904,6 +1904,11 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
public boolean validateGroupId(long groupId) {
return true;
}
@Override
public void onApplyCaption(CharSequence caption) {
}
}
public interface PhotoViewerProvider {
@ -1940,6 +1945,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
void onCaptionChanged(CharSequence caption);
boolean closeKeyboard();
boolean validateGroupId(long groupId);
void onApplyCaption(CharSequence caption);
}
private class FrameLayoutDrawer extends SizeNotifierFrameLayoutPhoto {
@ -6780,6 +6786,9 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
if (captionEditText.getFieldCharSequence().length() != 0 && !placeProvider.isPhotoChecked(currentIndex)) {
setPhotoChecked();
}
if (placeProvider != null) {
placeProvider.onApplyCaption(caption);
}
setCurrentCaption(null, result[0], false);
}
captionEditText.setTag(null);