mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43: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() {
|
override fun onResume() {
|
||||||
folderAdapter.notifyDataSetChanged()
|
folderAdapter.notifyDataSetChanged()
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,9 @@ import java.io.FileInputStream
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom Selector Image Fragment.
|
||||||
|
*/
|
||||||
class ImageFragment: CommonsDaggerSupportFragment() {
|
class ImageFragment: CommonsDaggerSupportFragment() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -169,6 +172,10 @@ class ImageFragment: CommonsDaggerSupportFragment() {
|
||||||
// todo change span count depending on the device orientation and other factos.
|
// 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() {
|
override fun onResume() {
|
||||||
imageAdapter.notifyDataSetChanged()
|
imageAdapter.notifyDataSetChanged()
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
|
|
||||||
|
|
@ -266,7 +266,14 @@ class ImageLoader @Inject constructor(
|
||||||
object ERROR : Result()
|
object ERROR : Result()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Companion Object
|
||||||
|
*/
|
||||||
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
|
const val INVALIDATE_DAY_COUNT: Long = 7
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,11 @@ public class UploadItem {
|
||||||
private final String createdTimestampSource;
|
private final String createdTimestampSource;
|
||||||
private final BehaviorSubject<Integer> imageQuality;
|
private final BehaviorSubject<Integer> imageQuality;
|
||||||
private boolean hasInvalidLocation;
|
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;
|
private final Uri contentUri;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue