From fdc2e17d39ce345eac74de95fe7328cbf4eb6396 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 29 Feb 2016 20:27:51 +0100 Subject: [PATCH] initialize the albums at resume, to act properly on images deletion --- .../gallery/activities/MainActivity.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java b/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java index 43700b0bd..a74573526 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java +++ b/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java @@ -36,6 +36,15 @@ public class MainActivity extends AppCompatActivity implements OnItemClickListen protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); + } + + @Override + protected void onResume() { + super.onResume(); + tryloadGallery(); + } + + private void tryloadGallery() { if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) { initializeGallery(); } else {