mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
refractoring (#4545)
This commit is contained in:
parent
dfabaf8b42
commit
79447cfaf3
4 changed files with 23 additions and 0 deletions
|
|
@ -123,6 +123,10 @@ class FolderFragment : CommonsDaggerSupportFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* onResume
|
||||
* notifyDataSetChanged, rebuild the holder views to account for deleted images, folders.
|
||||
*/
|
||||
override fun onResume() {
|
||||
folderAdapter.notifyDataSetChanged()
|
||||
super.onResume()
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@ import java.io.FileInputStream
|
|||
import java.net.URI
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
* Custom Selector Image Fragment.
|
||||
*/
|
||||
class ImageFragment: CommonsDaggerSupportFragment() {
|
||||
|
||||
/**
|
||||
|
|
@ -169,6 +172,10 @@ class ImageFragment: CommonsDaggerSupportFragment() {
|
|||
// todo change span count depending on the device orientation and other factos.
|
||||
}
|
||||
|
||||
/**
|
||||
* onResume
|
||||
* notifyDataSetChanged, rebuild the holder views to account for deleted images.
|
||||
*/
|
||||
override fun onResume() {
|
||||
imageAdapter.notifyDataSetChanged()
|
||||
super.onResume()
|
||||
|
|
|
|||
|
|
@ -266,7 +266,14 @@ class ImageLoader @Inject constructor(
|
|||
object ERROR : Result()
|
||||
}
|
||||
|
||||
/**
|
||||
* Companion Object
|
||||
*/
|
||||
companion object {
|
||||
/**
|
||||
* Invalidate Day count.
|
||||
* False Database Entries are invalid after INVALIDATE_DAY_COUNT and need to be re-queried.
|
||||
*/
|
||||
const val INVALIDATE_DAY_COUNT: Long = 7
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,11 @@ public class UploadItem {
|
|||
private final String createdTimestampSource;
|
||||
private final BehaviorSubject<Integer> imageQuality;
|
||||
private boolean hasInvalidLocation;
|
||||
|
||||
/**
|
||||
* Uri of uploadItem
|
||||
* Uri points to image location or name, eg content://media/external/images/camera/10495 (Android 10)
|
||||
*/
|
||||
private final Uri contentUri;
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue