Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
fix oversight

Remove title
  • Loading branch information
FabianDevel committed Apr 5, 2022
1 parent 60a3cf7 commit 2582edb
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ open class FileListFragment : MultiSelectFragment(MATOMO_CATEGORY), SwipeRefresh
}
}) else null

showSnackbar(title, showAboveFab = true, onActionClicked = onCancelActionClicked)
} ?: run { showSnackbar(title, showAboveFab = true) }
showSnackbar(title, true, onActionClicked = onCancelActionClicked)
} ?: run { showSnackbar(title, true) }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ class FileDetailsInfoFragment : FileDetailsSubFragment() {
if (apiResponse.isSuccess()) {
shareLinkContainer.update(apiResponse.data)
} else {
showSnackbar(getString(R.string.errorShareLink))
showSnackbar(R.string.errorShareLink)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class FileShareDetailsFragment : Fragment() {
if (apiResponse.isSuccess()) {
shareLinkContainer.update(apiResponse.data)
} else {
showSnackbar(getString(R.string.errorShareLink))
showSnackbar(R.string.errorShareLink)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,10 @@ class PreviewSliderFragment : Fragment(), FileInfoActionsView.OnItemClickListene
override fun copyPublicLink() {
bottomSheetFileInfos.createPublicCopyLink(onSuccess = { file ->
previewSliderAdapter.updateFile(currentFile.id) { it.shareLink = file?.shareLink }
showSnackbar(titleId = R.string.fileInfoLinkCopiedToClipboard)
showSnackbar(R.string.fileInfoLinkCopiedToClipboard)
toggleBottomSheet(true)
}, onError = { translatedError ->
showSnackbar(title = translatedError)
showSnackbar(translatedError)
toggleBottomSheet(true)
})
}
Expand Down Expand Up @@ -426,7 +426,7 @@ class PreviewSliderFragment : Fragment(), FileInfoActionsView.OnItemClickListene
toggleBottomSheet(true)
}
} else {
showSnackbar(getString(R.string.errorDuplicate))
showSnackbar(R.string.errorDuplicate)
toggleBottomSheet(true)
}
onApiResponse()
Expand Down Expand Up @@ -464,7 +464,7 @@ class PreviewSliderFragment : Fragment(), FileInfoActionsView.OnItemClickListene
showSnackbar(title)
mainViewModel.deleteFileFromHome.value = true
} else {
showSnackbar(getString(R.string.errorDelete))
showSnackbar(R.string.errorDelete)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class HomeActivitiesFragment : Fragment() {
}
onFileClicked = { currentFile, validPreviewFiles ->
if (currentFile.isTrashed()) {
showSnackbar(getString(R.string.errorPreviewTrash), showAboveFab = true)
showSnackbar(R.string.errorPreviewTrash, true)
} else Utils.displayFile(mainViewModel, findNavController(), currentFile, validPreviewFiles)
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/navigation/main_navigation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
<dialog
android:id="@+id/fileInfoActionsBottomSheetDialog"
android:name="com.infomaniak.drive.ui.bottomSheetDialogs.FileInfoActionsBottomSheetDialog"
android:label="@string/fileActionBottomSheetDialog"
android:label="FileInfoActionsBottomSheetDialog"
tools:layout="@layout/fragment_bottom_sheet_file_info_actions">
<argument
android:name="fileId"
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
<string name="app_name" translatable="false">kDrive</string>
<string name="allCommonDocuments" translatable="false">Common Documents</string>

<string name="fileActionBottomSheetDialog" translatable="false">FileInfoActionsBottomSheetDialog</string>

<string name="notification_channel_id_comment" translatable="false">comment_channel_id</string>
<string name="notification_channel_id_general" translatable="false">general_channel_id</string>
<string name="notification_channel_id_shared" translatable="false">shared_channel_id</string>
Expand Down

0 comments on commit 2582edb

Please sign in to comment.