Skip to content

Commit

Permalink
Merge pull request #313 from hypha-dao/chore/implement-dao-and-creato…
Browse files Browse the repository at this point in the history
…r-image

refactor: remove Json keys and add creator and voter names to placeholder display
  • Loading branch information
Zied-Dahmani authored Sep 23, 2024
2 parents 4b3a15e + 5e13338 commit 4a4cab5
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions lib/core/network/models/base_proposal_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ abstract class BaseProposalModel {
@JsonKey(name: 'docId')
final String id;

@JsonKey(name: 'dao')
DaoData? dao;

@JsonKey(name: 'details_timeShareX100_i')
Expand All @@ -26,7 +25,6 @@ abstract class BaseProposalModel {
@JsonKey(name: 'ballot_expiration_t')
final DateTime? expiration;

@JsonKey(name: 'creator')
ProfileData? creator;

@JsonKey(name: 'vote')
Expand Down
1 change: 0 additions & 1 deletion lib/design/avatar_image/hypha_avatar_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class HyphaAvatarImage extends StatelessWidget {
} else if (name != null) {
image = _buildFallbackAvatar(context);
} else {
// TODO(Zied): change the icon
image = Icon(HyphaIcons.image, size: imageRadius, color: context.textTheme.titleSmall?.color);
}

Expand Down
1 change: 1 addition & 0 deletions lib/ui/proposals/components/proposal_creator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class ProposalCreator extends StatelessWidget {
HyphaAvatarImage(
imageRadius: 24,
imageFromUrl: creator?.avatarUrl,
name: creator?.name,
),
const SizedBox(width: 10),
Expanded(
Expand Down
1 change: 1 addition & 0 deletions lib/ui/proposals/details/components/proposal_voters.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class ProposalVoters extends StatelessWidget {
: HyphaAvatarImage(
imageRadius: 24,
imageFromUrl: votes[index].voterImageUrl,
name: votes[index].voter,
),
);
},
Expand Down

0 comments on commit 4a4cab5

Please sign in to comment.