Skip to content

Commit

Permalink
fix: Indicates that dropbox cannot be used
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisBodin committed Jan 2, 2025
1 parent eacd4d9 commit b639be1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ object DriveInfosController {
): Drive? {
val block: (Realm) -> Drive? = { realm ->
realm.getDrivesQuery(userId, driveId, sharedWithMe, maintenance).findFirst()?.let {
if (customRealm == null) realm.copyFromRealm(it, 1) else it
if (customRealm == null) realm.copyFromRealm(it, 2) else it
}
}
return customRealm?.let(block) ?: getRealmInstance().use(block)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ open class Drive(
var pack: DrivePack? = DrivePack(),
var size: Long = 0,
var version: String = "",
@SerializedName("pack_functionality")
private var _packFunctionality: DrivePackFunctionality? = DrivePackFunctionality(),
@SerializedName("users")
private var _users: DriveUsersCategories? = DriveUsersCategories(),
@SerializedName("teams")
Expand All @@ -81,9 +79,6 @@ open class Drive(
val driveAccount: DriveAccount
get() = _driveAccount ?: DriveAccount()

val packFunctionality: DrivePackFunctionality
get() = _packFunctionality ?: DrivePackFunctionality()

val preferences: DrivePreferences
get() = _preferences ?: DrivePreferences()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class FileInfoActionsBottomSheetDialog : BottomSheetDialogFragment(), FileInfoAc
)
)
} else {
if (AccountUtils.getCurrentDrive()?.packFunctionality?.dropbox == true) {
if (AccountUtils.getCurrentDrive()?.pack?.capabilities?.useDropbox == true) {
safeNavigate(
FileInfoActionsBottomSheetDialogDirections.actionFileInfoActionsBottomSheetDialogToConvertToDropBoxFragment(
fileId = currentFile.id,
Expand Down

0 comments on commit b639be1

Please sign in to comment.