Skip to content

Commit

Permalink
final 3.12.3 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipthelen committed Jan 28, 2025
1 parent 8065cac commit b2baa0f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
27 changes: 12 additions & 15 deletions HabitRPG/Storyboards/Base.lproj/Social.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,14 @@
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dKe-8b-7wA">
<rect key="frame" x="0.0" y="0.0" width="375" height="583"/>
<subviews>
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FSC-0T-avm">
<rect key="frame" x="0.0" y="-384" width="375" height="400"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FSC-0T-avm">
<rect key="frame" x="0.0" y="-384" width="375" height="1741"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
<stackView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" misplaced="YES" axis="vertical" distribution="fillProportionally" spacing="28" translatesAutoresizingMaskIntoConstraints="NO" id="Q0X-P7-X28">
<rect key="frame" x="15" y="16" width="345" height="1276"/>
<stackView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" axis="vertical" distribution="fillProportionally" spacing="28" translatesAutoresizingMaskIntoConstraints="NO" id="Q0X-P7-X28">
<rect key="frame" x="15" y="16" width="345" height="1326"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="vms-Gl-8Ff">
<stackView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="vms-Gl-8Ff">
<rect key="frame" x="0.0" y="0.0" width="345" height="1129"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hdi-g1-MiM">
Expand Down Expand Up @@ -367,7 +367,7 @@
</stackView>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="UPz-xj-UTk">
<stackView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="UPz-xj-UTk">
<rect key="frame" x="0.0" y="1157" width="345" height="91"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PvU-aP-uYa">
Expand All @@ -390,24 +390,21 @@
</textView>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="03F-b3-D6O">
<rect key="frame" x="0.0" y="1276" width="345" height="0.0"/>
<stackView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="03F-b3-D6O">
<rect key="frame" x="0.0" y="1276" width="345" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="q4z-83-kc2">
<rect key="frame" x="0.0" y="0.0" width="345" height="0.0"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="q4z-83-kc2">
<rect key="frame" x="0.0" y="0.0" width="345" height="50"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.53023332359999997" green="0.50720638039999999" blue="0.56472396849999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<constraints>
<constraint firstAttribute="height" priority="500" constant="400" id="eS1-jS-yzC"/>
</constraints>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gLh-F8-lA2">
<rect key="frame" x="0.0" y="1307" width="375" height="70"/>
<rect key="frame" x="0.0" y="1357" width="375" height="70"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="Tp5-9p-PEL">
<rect key="frame" x="16" y="18" width="343" height="36"/>
Expand Down Expand Up @@ -2703,7 +2700,7 @@
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemRedColor">
<color red="1" green="0.23137254901960785" blue="0.18823529411764706" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="1" green="0.23137254900000001" blue="0.18823529410000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
15 changes: 9 additions & 6 deletions HabitRPG/UI/Social/QuestDetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,16 @@ class QuestDetailViewController: BaseUIViewController {
}).start())
}

let participantCount = group.quest?.members.count ?? 0
if isQuestActive {
let participantCount = group.quest?.members.filter({ participant in
return participant.accepted
}).count ?? 0
let attributedText = NSMutableAttributedString(string: L10n.Quests.participantsHeader, attributes: [.foregroundColor: UIColor.gray200])
attributedText.append(NSAttributedString(string: " \(participantCount)", attributes: [.foregroundColor: UIColor.gray400]))
print(attributedText)
invitationsHeader.attributedText = attributedText
} else {
let participantCount = group.quest?.members.count ?? 0
let respondedCount = group.quest?.members.filter({ (participant) -> Bool in
return participant.responded
}).count ?? 0
Expand All @@ -216,13 +220,12 @@ class QuestDetailViewController: BaseUIViewController {
view.removeFromSuperview()
}
participants.forEach { (participant) in
if isQuestActive && participant.accepted != true {
return
}
let view = QuestParticipantView()
if let member = members.first(where: { (member) -> Bool in
if isQuestActive {
return member.id == participant.userID && participant.accepted
} else {
return member.id == participant.userID
}
return member.id == participant.userID
}) {
view.configure(member: member)
} else {
Expand Down

0 comments on commit b2baa0f

Please sign in to comment.