fix: hide camera cache when instant camera disable from nekogram
This commit is contained in:
parent
a5200106ac
commit
de0a634e69
@ -25,6 +25,8 @@ import org.telegram.ui.Components.LayoutHelper;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import tw.nekomimi.nekogram.NekoConfig;
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public class PhotoAttachCameraCell extends FrameLayout {
|
||||
|
||||
@ -78,11 +80,13 @@ public class PhotoAttachCameraCell extends FrameLayout {
|
||||
|
||||
public void updateBitmap() {
|
||||
Bitmap bitmap = null;
|
||||
try {
|
||||
File file = new File(ApplicationLoader.getFilesDirFixed(), "cthumb.jpg");
|
||||
bitmap = BitmapFactory.decodeFile(file.getAbsolutePath());
|
||||
} catch (Throwable ignore) {
|
||||
if (!NekoConfig.disableInstantCamera.Bool()) {
|
||||
try {
|
||||
File file = new File(ApplicationLoader.getFilesDirFixed(), "cthumb.jpg");
|
||||
bitmap = BitmapFactory.decodeFile(file.getAbsolutePath());
|
||||
} catch (Throwable ignore) {
|
||||
|
||||
}
|
||||
}
|
||||
if (bitmap != null) {
|
||||
backgroundView.setImageBitmap(bitmap);
|
||||
|
Loading…
Reference in New Issue
Block a user