Skip to content

Commit

Permalink
Some fixes from CR
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitorbp committed Nov 2, 2023
1 parent 0f06c1d commit fe6aaf2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,6 @@ class MainFileListFragment : Fragment(),
if (ocFile.isFolder) {
mainFileListViewModel.updateFolderToDisplay(ocFile)
} else { // Click on a file
fileOperationsViewModel.setLastUsageFile(ocFile)
fileActions?.onFileClicked(ocFile)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1731,6 +1731,7 @@ class FileDisplayActivity : FileActivity(),
startSyncThenOpen(file)
}
}
fileOperationsViewModel.setLastUsageFile(file)
}

override fun onShareFileClicked(file: OCFile) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 fe6aaf2

Please sign in to comment.