minor fixes
This commit is contained in:
parent
35929fa7ab
commit
184f65eab6
3 changed files with 5 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
||||||
package deckers.thibault.aves.model
|
package deckers.thibault.aves.model
|
||||||
|
|
||||||
enum class NameConflictStrategy {
|
enum class NameConflictStrategy {
|
||||||
SKIP, REPLACE, RENAME;
|
RENAME, REPLACE, SKIP;
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun get(name: String?): NameConflictStrategy? {
|
fun get(name: String?): NameConflictStrategy? {
|
||||||
|
|
|
@ -339,9 +339,9 @@ class MediaStoreImageProvider : ImageProvider() {
|
||||||
): FieldMap {
|
): FieldMap {
|
||||||
val sourceFile = File(sourcePath)
|
val sourceFile = File(sourcePath)
|
||||||
val sourceDir = sourceFile.parent?.let { ensureTrailingSeparator(it) }
|
val sourceDir = sourceFile.parent?.let { ensureTrailingSeparator(it) }
|
||||||
if (sourceDir == destinationDir) {
|
if (sourceDir == destinationDir && !(copy && nameConflictStrategy == NameConflictStrategy.RENAME)) {
|
||||||
if (copy) throw Exception("file at path=$sourcePath is already in destination directory")
|
// nothing to do unless it's a renamed copy
|
||||||
return HashMap<String, Any?>()
|
return skippedFieldMap
|
||||||
}
|
}
|
||||||
|
|
||||||
val sourceFileName = sourceFile.name
|
val sourceFileName = sourceFile.name
|
||||||
|
|
|
@ -248,7 +248,7 @@ class _MapPageContentState extends State<MapPageContent> with SingleTickerProvid
|
||||||
return ThumbnailScroller(
|
return ThumbnailScroller(
|
||||||
availableWidth: mqWidth,
|
availableWidth: mqWidth,
|
||||||
entryCount: regionEntries.length,
|
entryCount: regionEntries.length,
|
||||||
entryBuilder: (index) => regionEntries[index],
|
entryBuilder: (index) => index < regionEntries.length ? regionEntries[index] : null,
|
||||||
indexNotifier: _selectedIndexNotifier,
|
indexNotifier: _selectedIndexNotifier,
|
||||||
onTap: _onThumbnailTap,
|
onTap: _onThumbnailTap,
|
||||||
heroTagger: (entry) => Object.hashAll([regionCollection?.id, entry.uri]),
|
heroTagger: (entry) => Object.hashAll([regionCollection?.id, entry.uri]),
|
||||||
|
|
Loading…
Reference in a new issue