Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some fixes from CR
Browse files Browse the repository at this point in the history
Aitorbp committed Oct 31, 2023
1 parent 3e58df0 commit 80ea9fa
Showing 4 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1133,7 +1133,6 @@ class MainFileListFragment : Fragment(),
if (ocFile.isFolder) {
mainFileListViewModel.updateFolderToDisplay(ocFile)
} else { // Click on a file
fileOperationsViewModel.setLastUsageFile(ocFile)
fileActions?.onFileClicked(ocFile)
}
}
Original file line number Diff line number Diff line change
@@ -1731,6 +1731,7 @@ class FileDisplayActivity : FileActivity(),
startSyncThenOpen(file)
}
}
fileOperationsViewModel.setLastUsageFile(file)
}

override fun onShareFileClicked(file: OCFile) {
Original file line number Diff line number Diff line change
@@ -698,7 +698,7 @@ class OCLocalFileDataSourceTest {
@Test
fun `updateFileWithLastUsage should change last usage parameter with null for a file`() {

every { dao.updateFileWithLastUsage(any(), null) } returns Unit
every { dao.updateFileWithLastUsage(OC_FILE.id!!, null) } returns Unit

localDataSource.updateFileWithLastUsage(OC_FILE.id!!, null)

Original file line number Diff line number Diff line change
@@ -33,5 +33,10 @@ class SetLastUsageFileUseCase(
}
}

data class Params(val fileId: Long, val lastUsage: Long?, val isAvailableLocally: Boolean, val isFolder: Boolean)
data class Params(
val fileId: Long,
val lastUsage: Long?,
val isAvailableLocally: Boolean,
val isFolder: Boolean,
)
}

0 comments on commit 80ea9fa

Please sign in to comment.