mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-12-05 16:22:31 -08:00
Migrate to API 28
This commit is contained in:
1 parent
02429d5790
commit
2c4a7e5576
5 files changed
+16
-14
No files matched your search
@@ -183,7 +183,7 @@ class GroupActivity : LockingActivity(),
|
||||
// Attach fragment to content view
|
||||
supportFragmentManager.beginTransaction().replace(
|
||||
R.id.nodes_list_fragment_container,
|
||||
mListNodesFragment,
|
||||
mListNodesFragment!!,
|
||||
fragmentTag)
|
||||
.commit()
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ class ListNodesFragment : StylishFragment(), SortDialogFragment.SortSelectionLis
|
||||
|
||||
onScrollListener?.let { onScrollListener ->
|
||||
listView?.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
||||
override fun onScrolled(recyclerView: RecyclerView?, dx: Int, dy: Int) {
|
||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||
super.onScrolled(recyclerView, dx, dy)
|
||||
onScrollListener.onScrolled(dy)
|
||||
}
|
||||
|
||||
@@ -52,17 +52,19 @@ open class FileInfo : Serializable {
|
||||
fun init() {
|
||||
this.filePath = fileUri.path
|
||||
if (EXTERNAL_STORAGE_AUTHORITY == fileUri.authority) {
|
||||
val file = DocumentFile.fromSingleUri(context, fileUri)
|
||||
size = file.length()
|
||||
fileName = file.name
|
||||
lastModification = Date(file.lastModified())
|
||||
} else {
|
||||
filePath?.let {
|
||||
val file = File(it)
|
||||
DocumentFile.fromSingleUri(context, fileUri)?.let { file ->
|
||||
size = file.length()
|
||||
fileName = file.name
|
||||
lastModification = Date(file.lastModified())
|
||||
}
|
||||
} else {
|
||||
filePath?.let {
|
||||
File(it).let { file ->
|
||||
size = file.length()
|
||||
fileName = file.name
|
||||
lastModification = Date(file.lastModified())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fileName == null || fileName!!.isEmpty()) {
|
||||
|
||||
Reference in new issue
Block a user