diff --git a/lib/properties/account.dart b/lib/properties/account.dart index ab3320da..78b7b322 100644 --- a/lib/properties/account.dart +++ b/lib/properties/account.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + /// Account information, which is exposed for information and debugging purposes /// and should be ignored in most cases. /// @@ -18,6 +20,16 @@ class Account { /// Android mimetypes provided by this account. List mimetypes; + + /// On Android, the rawId isn't uniq + String getAccountId() { + if (Platform.isAndroid) { + return '$name|$type'; + } else { + return rawId; + } + } + Account(this.rawId, this.type, this.name, this.mimetypes); factory Account.fromJson(Map json) => Account(