Skip to content

Commit

Permalink
feat - #238 sort links on about us team - rename flag
Browse files Browse the repository at this point in the history
  • Loading branch information
mikolaj-jalocha committed Sep 28, 2024
1 parent bc67baf commit dc27f0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/features/about_us_view/models/member_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MemberData {

static IList<ContactIconsModel> _determineLinksIcons(IList<String> urls) {
return urls
.map((url) => ContactIconsModel(url: url, isSciClub: false))
.map((url) => ContactIconsModel(url: url, isTeamMember: true))
.toIList()
.sort((a, b) => a.order.compareTo(b.order));
}
Expand Down
6 changes: 3 additions & 3 deletions lib/utils/determine_contact_icon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ class ContactIconsModel {
final String? text;
final String? url;
final int order;
final bool isSciClub;
final bool isTeamMember;

ContactIconsModel({
String? text,
this.url,
this.isSciClub = true,
this.isTeamMember = false,
}) : icon = url.determineIcon(),
order = isSciClub
order = !isTeamMember
? url.determineIconOrderForSciClubs()
: url.determineIconOrderForAboutUs(),
text = text ?? url;
Expand Down

0 comments on commit dc27f0b

Please sign in to comment.