Skip to content

Commit

Permalink
Merge branch 'main' into Sang/fix/refactor_get_balance
Browse files Browse the repository at this point in the history
  • Loading branch information
ppupha authored Jan 7, 2025
2 parents 9bd1ecd + 0d38ce8 commit c89285f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions lib/model/ff_alumni.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class AlumniAccount {
this.bio,
this.email,
this.avatarURI,
this.avatarDisplay,
this.location,
this.website,
this.company,
Expand All @@ -28,6 +29,7 @@ class AlumniAccount {
bio: json['bio'] as String?,
email: json['email'] as String?,
avatarURI: json['avatarURI'] as String?,
avatarDisplay: json['avatarDisplay'] as String?,
location: json['location'] as String?,
website: json['website'] as String?,
company: json['company'] as String?,
Expand Down Expand Up @@ -58,6 +60,7 @@ class AlumniAccount {
final String? bio;
final String? email;
final String? avatarURI;
final String? avatarDisplay;
final String? location;
final String? website;
final String? company;
Expand All @@ -76,6 +79,7 @@ class AlumniAccount {
'bio': bio,
'email': email,
'avatarURI': avatarURI,
'avatarDisplay': avatarDisplay,
'location': location,
'website': website,
'company': company,
Expand Down
10 changes: 7 additions & 3 deletions lib/util/feralfile_alumni_ext.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:autonomy_flutter/model/common.dart';
import 'package:autonomy_flutter/model/ff_alumni.dart';
import 'package:autonomy_flutter/util/alias_helper.dart';
import 'package:autonomy_flutter/util/exhibition_ext.dart';
Expand All @@ -7,9 +8,12 @@ extension AlumniAccountExt on AlumniAccount {
String get displayAlias =>
AliasHelper.transform(alias ?? id, isArtistOrCurator: true);

String? get avatarUrl => (avatarURI != null && avatarURI!.isNotEmpty)
? getFFUrl(avatarURI!)
: null;
String? get avatarUrl {
final uri = avatarDisplay?.isNotEmpty ?? false ? avatarDisplay : avatarURI;
return uri != null
? getFFUrl(uri, variant: CloudFlareVariant.m.value)
: null;
}

List<String> get websiteUrl {
final listRawWebsite =
Expand Down

0 comments on commit c89285f

Please sign in to comment.