Commit 99a2c0d4 authored by Donald's avatar Donald

rename Album Improved

[fixed mediasore updates in rename]
parent e3f65a9f
......@@ -255,17 +255,14 @@ public class HandlingAlbums {
try {
File from = new File(olderPath);
File to = new File(StringUtils.getAlbumPathRenamed(olderPath, name));
String s[] = from.list(), dirPath = from.getAbsolutePath();
for (String paht : s) scanFile(new String[]{dirPath + "/" + paht});
from.renameTo(to);
//from.list();
//context.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(from)));
//context.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(to)));
//Log.wtf("asdasdasdasd - from",from.getAbsolutePath());
//Log.wtf("asdasdasdasd - to",to.getAbsolutePath());
//
//scanFile(from.list());
scanFile(to.list());
// scanFile(new String[]{from.list(), to.getAbsolutePath()});
s = to.list();
dirPath = to.getAbsolutePath();
for (String paht : s) scanFile(new String[]{dirPath + "/" + paht});
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -298,10 +298,11 @@ public class PhotosActivity extends AppCompatActivity {
public void onInput(MaterialDialog dialog, CharSequence input) {
/* TODO make this better
albums.renameAlbum(photos.FolderPath, input.toString());
finish();
//onBackPressed();
//finish();*/
StringUtils.showToast(getApplicationContext(), "I have to fix this!");
*/
}
}).show();
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment