Fix profile fields not displaying

Closes #96
This commit is contained in:
Shadowfacts 2020-06-15 18:36:04 -04:00
parent c0316f55ef
commit 61c6d63c67
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
2 changed files with 7 additions and 7 deletions

View File

@ -28,7 +28,7 @@ class ProfileHeaderTableViewCell: UITableViewCell {
@IBOutlet weak var noteTextView: StatusContentTextView!
@IBOutlet weak var fieldsStackView: UIStackView!
@IBOutlet weak var fieldNamesStackView: UIStackView!
@IBOutlet weak var fieldValuesStack: UIStackView!
@IBOutlet weak var fieldValuesStackView: UIStackView!
@IBOutlet weak var moreButtonVisualEffectView: UIVisualEffectView!
var accountID: String!
@ -102,7 +102,8 @@ class ProfileHeaderTableViewCell: UITableViewCell {
fieldsStackView.isHidden = account.fields.isEmpty
fieldsStackView.arrangedSubviews.forEach { $0.removeFromSuperview() }
fieldNamesStackView.arrangedSubviews.forEach { $0.removeFromSuperview() }
fieldValuesStackView.arrangedSubviews.forEach { $0.removeFromSuperview() }
for field in account.fields {
let nameLabel = UILabel()
nameLabel.text = field.name
@ -119,7 +120,7 @@ class ProfileHeaderTableViewCell: UITableViewCell {
valueTextView.textAlignment = .left
valueTextView.awakeFromNib()
valueTextView.navigationDelegate = delegate
fieldValuesStack.addArrangedSubview(valueTextView)
fieldValuesStackView.addArrangedSubview(valueTextView)
}
if accountUpdater == nil {

View File

@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16092.1" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16082.1"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@ -161,7 +160,7 @@
<outlet property="avatarImageView" destination="tH8-sR-DHC" id="6ll-yL-g1o"/>
<outlet property="displayNameLabel" destination="LjK-72-Bez" id="nIU-ey-H1C"/>
<outlet property="fieldNamesStackView" destination="pV2-Mz-54W" id="xfG-60-K0s"/>
<outlet property="fieldValuesStack" destination="oza-9d-8v4" id="UIS-KM-5fR"/>
<outlet property="fieldValuesStackView" destination="oza-9d-8v4" id="UIS-KM-5fR"/>
<outlet property="fieldsStackView" destination="sHU-GU-klv" id="Gli-Gf-Ubh"/>
<outlet property="followsYouLabel" destination="a32-1a-xXZ" id="phY-0L-NnN"/>
<outlet property="headerImageView" destination="Fw7-OL-iy5" id="6sv-E5-D73"/>