Skip to content

Commit

Permalink
fix: Indicates that dropbox cannot be used (#1508)
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisBodin authored Jan 3, 2025
2 parents eacd4d9 + 5aca300 commit bf4f68b
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 48 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

This file was deleted.

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
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object RealmModules {

@RealmModule(
classes = [
Drive::class, DrivePackFunctionality::class, DrivePreferences::class, DriveUsersCategories::class, DriveUser::class,
Drive::class, DrivePreferences::class, DriveUsersCategories::class, DriveUser::class,
Team::class, TeamDetails::class, DriveTeamsCategories::class, Category::class, CategoryRights::class,
DriveCapabilities::class, DrivePack::class, DrivePackCapabilities::class, DriveRights::class, DriveAccount::class,
]
Expand Down

0 comments on commit bf4f68b

Please sign in to comment.