mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 08:18:00 +01:00
update the actionbar title after renaming an item
This commit is contained in:
parent
6c5a428b40
commit
1ed45dcc3d
1 changed files with 6 additions and 4 deletions
|
@ -124,7 +124,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
R.id.menu_rename -> {
|
R.id.menu_rename -> {
|
||||||
editMedium()
|
renameFile()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
R.id.menu_edit -> {
|
R.id.menu_edit -> {
|
||||||
|
@ -233,9 +233,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun editMedium() {
|
private fun renameFile() {
|
||||||
RenameFileDialog(this, getCurrentFile()) {
|
RenameFileDialog(this, getCurrentFile()) {
|
||||||
mMedia[view_pager.currentItem].path = it.absolutePath
|
mMedia[mPos].path = it.absolutePath
|
||||||
updateActionbarTitle()
|
updateActionbarTitle()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -289,7 +289,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateActionbarTitle() {
|
private fun updateActionbarTitle() {
|
||||||
title = mMedia[mPos].path.getFilenameFromPath()
|
runOnUiThread {
|
||||||
|
title = mMedia[mPos].path.getFilenameFromPath()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getCurrentMedium(): Medium? {
|
private fun getCurrentMedium(): Medium? {
|
||||||
|
|
Loading…
Reference in a new issue