Browse Source

Update status table view

master
Dwayne Harris 6 years ago
parent
commit
17dd2c40f5
  1. 13
      elpha-ios/AccountTableViewController.swift
  2. 428
      elpha-ios/Base.lproj/Main.storyboard
  3. 1
      elpha-ios/InstanceViewController.swift
  4. 2
      elpha-ios/MainStatusTableViewCell.swift
  5. 18
      elpha-ios/StatusTableViewController.swift
  6. 7
      elpha-ios/StatusView.xib
  7. 13
      elpha-ios/TimelineTableViewController.swift

13
elpha-ios/AccountTableViewController.swift

@ -176,15 +176,24 @@ class AccountTableViewController: AbstractStatusTableViewController {
override func loadMoreTapped(status: StatusMO, direction: PaginationDirection) {
if let markers = status.markers {
markers.forEach { marker in
var removeAt = -1
for (index, marker) in markers.enumerated() {
if marker.context == self.currentPaginationContext && marker.item.direction == direction {
fetchStatuses(withPagination: marker.item) { error in
if error != nil {
if error == nil {
removeAt = index
} else {
AlertManager.shared.show(message: error!.localizedDescription, category: .error)
}
}
}
}
if removeAt > -1 {
status.markers?.remove(at: removeAt)
CoreDataManager.shared.saveContext()
}
}
}

428
elpha-ios/Base.lproj/Main.storyboard

@ -1352,189 +1352,81 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="MainStatusTableViewCell" rowHeight="582" id="8ys-Fm-1Yg" customClass="MainStatusTableViewCell" customModule="elpha_ios" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="375" height="582"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="MainStatusTableViewCell" rowHeight="675" id="8ys-Fm-1Yg" customClass="MainStatusTableViewCell" customModule="elpha_ios" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="375" height="675"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="8ys-Fm-1Yg" id="Hj7-kC-H7L">
<rect key="frame" x="0.0" y="0.0" width="375" height="582"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="675"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7I8-6E-s1Q">
<rect key="frame" x="0.0" y="21" width="375" height="60"/>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="hBh-J5-s0Y">
<rect key="frame" x="0.0" y="0.0" width="375" height="675"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="LHS-vw-fZE">
<rect key="frame" x="8" y="0.0" width="55" height="55"/>
<constraints>
<constraint firstAttribute="width" constant="55" id="Qmn-E0-76F"/>
<constraint firstAttribute="height" constant="55" id="yC2-zX-OiV"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Display Name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vDe-e6-p1i">
<rect key="frame" x="71" y="0.0" width="296" height="23"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="19"/>
<color key="textColor" name="Text"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Username" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8fE-Hr-jgf">
<rect key="frame" x="71" y="25" width="296" height="19.333333333333329"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" name="Primary"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" name="Background Secondary"/>
<gestureRecognizers/>
<constraints>
<constraint firstItem="LHS-vw-fZE" firstAttribute="top" secondItem="7I8-6E-s1Q" secondAttribute="top" id="BGV-3e-Lcz"/>
<constraint firstAttribute="trailing" secondItem="vDe-e6-p1i" secondAttribute="trailing" constant="8" id="JRh-Vb-LYE"/>
<constraint firstItem="8fE-Hr-jgf" firstAttribute="leading" secondItem="LHS-vw-fZE" secondAttribute="trailing" constant="8" id="QNe-8B-pO9"/>
<constraint firstItem="LHS-vw-fZE" firstAttribute="leading" secondItem="7I8-6E-s1Q" secondAttribute="leading" constant="8" id="dRT-UK-NcO"/>
<constraint firstItem="vDe-e6-p1i" firstAttribute="leading" secondItem="LHS-vw-fZE" secondAttribute="trailing" constant="8" id="f7a-Iy-dQ1"/>
<constraint firstItem="8fE-Hr-jgf" firstAttribute="top" secondItem="vDe-e6-p1i" secondAttribute="bottom" constant="2" id="i0D-5P-20W"/>
<constraint firstItem="vDe-e6-p1i" firstAttribute="top" secondItem="7I8-6E-s1Q" secondAttribute="top" id="pgA-eb-pGk"/>
<constraint firstAttribute="trailing" secondItem="8fE-Hr-jgf" secondAttribute="trailing" constant="8" id="qe7-8Y-2Te"/>
<constraint firstAttribute="height" constant="60" id="sS1-Yz-Efq"/>
</constraints>
<connections>
<outletCollection property="gestureRecognizers" destination="9oO-pp-jqy" appends="YES" id="BaS-cR-tSR"/>
</connections>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="C8A-x8-8TG">
<rect key="frame" x="8" y="533" width="160" height="30"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Clock" translatesAutoresizingMaskIntoConstraints="NO" id="me9-4K-dS0">
<rect key="frame" x="0.0" y="7.6666666666666288" width="15" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="5dr-8g-kIx"/>
<constraint firstAttribute="width" constant="15" id="k1I-ba-8Nj"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="January 1st, 2018" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="peo-RN-z7p">
<rect key="frame" x="23" y="0.0" width="137" height="15.666666666666666"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="Text"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="9:00 AM" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Apt-wY-ttS">
<rect key="frame" x="23" y="14.333333333333371" width="137" height="15.666666666666664"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="Primary"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" name="Background Secondary"/>
<constraints>
<constraint firstItem="me9-4K-dS0" firstAttribute="centerY" secondItem="C8A-x8-8TG" secondAttribute="centerY" id="Ptv-cd-e1w"/>
<constraint firstItem="peo-RN-z7p" firstAttribute="top" secondItem="C8A-x8-8TG" secondAttribute="top" id="YL7-OU-RIQ"/>
<constraint firstItem="Apt-wY-ttS" firstAttribute="leading" secondItem="me9-4K-dS0" secondAttribute="trailing" constant="8" id="ZCq-Gp-f3M"/>
<constraint firstAttribute="trailing" secondItem="peo-RN-z7p" secondAttribute="trailing" id="fZX-tG-y6E"/>
<constraint firstAttribute="bottom" secondItem="Apt-wY-ttS" secondAttribute="bottom" id="hDW-Hd-ctD"/>
<constraint firstAttribute="height" constant="30" id="hls-KD-1cF"/>
<constraint firstAttribute="trailing" secondItem="Apt-wY-ttS" secondAttribute="trailing" id="l9T-vX-VBW"/>
<constraint firstAttribute="width" constant="160" id="mLk-eo-x6G"/>
<constraint firstItem="peo-RN-z7p" firstAttribute="leading" secondItem="me9-4K-dS0" secondAttribute="trailing" constant="8" id="qjg-WR-UCo"/>
<constraint firstItem="me9-4K-dS0" firstAttribute="leading" secondItem="C8A-x8-8TG" secondAttribute="leading" id="yO3-ig-Jeh"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Iqe-xC-DYy">
<rect key="frame" x="239" y="533" width="60" height="30"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="100" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3Ew-31-ZWY">
<rect key="frame" x="34" y="6.6666666666666288" width="26" height="17"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
<color key="textColor" name="Text"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Boost Regular" translatesAutoresizingMaskIntoConstraints="NO" id="X4x-5e-3Ms">
<rect key="frame" x="12" y="6" width="14" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="7mC-UE-wq5"/>
<constraint firstAttribute="width" constant="14" id="pwT-kW-wpk"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" name="Background Secondary"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="3Ew-31-ZWY" secondAttribute="trailing" id="3Jq-Ho-6AR"/>
<constraint firstAttribute="height" constant="30" id="FpV-XH-nDq"/>
<constraint firstItem="X4x-5e-3Ms" firstAttribute="centerY" secondItem="Iqe-xC-DYy" secondAttribute="centerY" id="GU3-Ll-dxY"/>
<constraint firstItem="3Ew-31-ZWY" firstAttribute="leading" secondItem="X4x-5e-3Ms" secondAttribute="trailing" constant="8" id="Gvp-jb-2L8"/>
<constraint firstItem="3Ew-31-ZWY" firstAttribute="centerY" secondItem="Iqe-xC-DYy" secondAttribute="centerY" id="MhK-X2-0ah"/>
<constraint firstAttribute="width" constant="60" id="zXz-Dr-CWl"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9oD-Y0-ilp">
<rect key="frame" x="307" y="533" width="60" height="30"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="100" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tch-E4-Saw">
<rect key="frame" x="26" y="6.6666666666666288" width="26" height="17"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
<color key="textColor" name="Text"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Star Regular" translatesAutoresizingMaskIntoConstraints="NO" id="B1s-Wp-hBJ">
<rect key="frame" x="3" y="7.6666666666666288" width="15" height="15"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="D1b-xI-QXf">
<rect key="frame" x="0.0" y="0.0" width="375" height="60"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="In Reply To" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ioe-cf-I72">
<rect key="frame" x="15" y="0.0" width="352" height="52"/>
<fontDescription key="fontDescription" type="system" weight="thin" pointSize="24"/>
<color key="textColor" name="Primary"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" name="Background Secondary"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="cf2-O1-ELz"/>
<constraint firstAttribute="width" constant="15" id="kiV-NO-p9O"/>
<constraint firstAttribute="trailing" secondItem="ioe-cf-I72" secondAttribute="trailing" constant="8" id="1ab-X3-pcv"/>
<constraint firstItem="ioe-cf-I72" firstAttribute="top" secondItem="D1b-xI-QXf" secondAttribute="top" id="GAb-cC-mdm"/>
<constraint firstItem="ioe-cf-I72" firstAttribute="leading" secondItem="D1b-xI-QXf" secondAttribute="leading" constant="15" id="GYR-Ug-PWh"/>
<constraint firstAttribute="bottom" secondItem="ioe-cf-I72" secondAttribute="bottom" constant="8" id="QXh-xZ-VHn"/>
<constraint firstAttribute="height" constant="60" id="bXe-7l-a7l"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" name="Background Secondary"/>
<gestureRecognizers/>
<constraints>
<constraint firstAttribute="width" constant="60" id="Re8-4t-uoD"/>
<constraint firstAttribute="trailing" secondItem="Tch-E4-Saw" secondAttribute="trailing" constant="8" id="Xty-RA-yBl"/>
<constraint firstItem="Tch-E4-Saw" firstAttribute="centerY" secondItem="9oD-Y0-ilp" secondAttribute="centerY" id="bhF-Xx-ZDe"/>
<constraint firstItem="Tch-E4-Saw" firstAttribute="leading" secondItem="B1s-Wp-hBJ" secondAttribute="trailing" constant="8" id="lvb-ix-ZAw"/>
<constraint firstItem="B1s-Wp-hBJ" firstAttribute="centerY" secondItem="9oD-Y0-ilp" secondAttribute="centerY" id="oWq-Qe-VMg"/>
<constraint firstAttribute="height" constant="30" id="xLI-sT-SnC"/>
</constraints>
<connections>
<outletCollection property="gestureRecognizers" destination="uBg-bz-egu" appends="YES" id="MSk-ph-Hi7"/>
</connections>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FZi-le-bmF">
<rect key="frame" x="171" y="533" width="60" height="30"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="100" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="06U-FB-yto">
<rect key="frame" x="34" y="6.6666666666666288" width="26" height="17"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
<color key="textColor" name="Text"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Message" translatesAutoresizingMaskIntoConstraints="NO" id="Jcf-Cv-8ki">
<rect key="frame" x="11" y="7.6666666666666288" width="15" height="15"/>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7I8-6E-s1Q">
<rect key="frame" x="0.0" y="60" width="375" height="90"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="LHS-vw-fZE">
<rect key="frame" x="8" y="20" width="55" height="55"/>
<constraints>
<constraint firstAttribute="width" constant="55" id="Qmn-E0-76F"/>
<constraint firstAttribute="height" constant="55" id="yC2-zX-OiV"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Display Name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vDe-e6-p1i">
<rect key="frame" x="71" y="20" width="296" height="23"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="19"/>
<color key="textColor" name="Text"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Username" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8fE-Hr-jgf">
<rect key="frame" x="71" y="45" width="296" height="19.333333333333329"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" name="Primary"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" name="Background Primary"/>
<gestureRecognizers/>
<constraints>
<constraint firstAttribute="width" constant="15" id="Vdk-0O-uij"/>
<constraint firstAttribute="height" constant="15" id="iPv-15-UbD"/>
<constraint firstItem="LHS-vw-fZE" firstAttribute="top" secondItem="7I8-6E-s1Q" secondAttribute="top" constant="20" id="BGV-3e-Lcz"/>
<constraint firstAttribute="trailing" secondItem="vDe-e6-p1i" secondAttribute="trailing" constant="8" id="JRh-Vb-LYE"/>
<constraint firstItem="8fE-Hr-jgf" firstAttribute="leading" secondItem="LHS-vw-fZE" secondAttribute="trailing" constant="8" id="QNe-8B-pO9"/>
<constraint firstItem="LHS-vw-fZE" firstAttribute="leading" secondItem="7I8-6E-s1Q" secondAttribute="leading" constant="8" id="dRT-UK-NcO"/>
<constraint firstItem="vDe-e6-p1i" firstAttribute="leading" secondItem="LHS-vw-fZE" secondAttribute="trailing" constant="8" id="f7a-Iy-dQ1"/>
<constraint firstItem="8fE-Hr-jgf" firstAttribute="top" secondItem="vDe-e6-p1i" secondAttribute="bottom" constant="2" id="i0D-5P-20W"/>
<constraint firstAttribute="bottom" secondItem="LHS-vw-fZE" secondAttribute="bottom" constant="15" id="jeQ-Lw-Rj8"/>
<constraint firstItem="vDe-e6-p1i" firstAttribute="top" secondItem="7I8-6E-s1Q" secondAttribute="top" constant="20" id="pgA-eb-pGk"/>
<constraint firstAttribute="trailing" secondItem="8fE-Hr-jgf" secondAttribute="trailing" constant="8" id="qe7-8Y-2Te"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" name="Background Secondary"/>
<gestureRecognizers/>
<constraints>
<constraint firstItem="06U-FB-yto" firstAttribute="leading" secondItem="Jcf-Cv-8ki" secondAttribute="trailing" constant="8" id="7La-R0-13y"/>
<constraint firstItem="06U-FB-yto" firstAttribute="centerY" secondItem="FZi-le-bmF" secondAttribute="centerY" id="HSO-JX-hg7"/>
<constraint firstAttribute="width" constant="60" id="Rnk-TV-JDR"/>
<constraint firstAttribute="height" constant="30" id="X8V-nT-8Ue"/>
<constraint firstItem="Jcf-Cv-8ki" firstAttribute="centerY" secondItem="FZi-le-bmF" secondAttribute="centerY" id="Zzj-qQ-SrD"/>
<constraint firstAttribute="trailing" secondItem="06U-FB-yto" secondAttribute="trailing" id="uJ8-JC-1Ql"/>
</constraints>
<connections>
<outletCollection property="gestureRecognizers" destination="dVp-l7-qxz" appends="YES" id="37g-LW-Ne9"/>
<outletCollection property="gestureRecognizers" destination="IYd-yl-Al5" appends="YES" id="G65-E0-qae"/>
</connections>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="hBh-J5-s0Y">
<rect key="frame" x="0.0" y="96" width="375" height="422"/>
<subviews>
<connections>
<outletCollection property="gestureRecognizers" destination="9oO-pp-jqy" appends="YES" id="BaS-cR-tSR"/>
</connections>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bsb-4z-qCl">
<rect key="frame" x="0.0" y="0.0" width="375" height="32"/>
<rect key="frame" x="0.0" y="150" width="375" height="30"/>
<subviews>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" text="Content" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="Qno-L9-nUh" customClass="UITextViewFixed" customModule="elpha_ios" customModuleProvider="target">
<rect key="frame" x="8" y="0.0" width="359" height="32"/>
<color key="backgroundColor" name="Background Secondary"/>
<rect key="frame" x="8" y="8" width="359" height="14"/>
<color key="backgroundColor" name="Background Primary"/>
<color key="tintColor" name="Primary"/>
<color key="textColor" name="Text"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
@ -1542,42 +1434,194 @@
<dataDetectorType key="dataDetectorTypes" phoneNumber="YES" link="YES" address="YES" calendarEvent="YES" shipmentTrackingNumber="YES" flightNumber="YES" lookupSuggestion="YES"/>
</textView>
</subviews>
<color key="backgroundColor" name="Background Secondary"/>
<color key="backgroundColor" name="Background Primary"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="Qno-L9-nUh" secondAttribute="bottom" id="M8W-95-H1q"/>
<constraint firstItem="Qno-L9-nUh" firstAttribute="top" secondItem="bsb-4z-qCl" secondAttribute="top" id="QpL-s9-Tq7"/>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="18i-Gd-cbz"/>
<constraint firstAttribute="bottom" secondItem="Qno-L9-nUh" secondAttribute="bottom" constant="8" id="M8W-95-H1q"/>
<constraint firstItem="Qno-L9-nUh" firstAttribute="top" secondItem="bsb-4z-qCl" secondAttribute="top" constant="8" id="QpL-s9-Tq7"/>
<constraint firstItem="Qno-L9-nUh" firstAttribute="leading" secondItem="bsb-4z-qCl" secondAttribute="leading" constant="8" id="TNL-xL-hoM"/>
<constraint firstAttribute="trailing" secondItem="Qno-L9-nUh" secondAttribute="trailing" constant="8" id="pub-Jf-c6W"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7SO-v5-Rfd">
<rect key="frame" x="0.0" y="47" width="375" height="375"/>
<rect key="frame" x="0.0" y="180" width="375" height="375"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" secondItem="7SO-v5-Rfd" secondAttribute="height" multiplier="1:1" id="OxV-Aa-cex"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HzB-eP-8UY">
<rect key="frame" x="0.0" y="555" width="375" height="60"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="C8A-x8-8TG">
<rect key="frame" x="8" y="13.666666666666629" width="160" height="33"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Clock" translatesAutoresizingMaskIntoConstraints="NO" id="me9-4K-dS0">
<rect key="frame" x="0.0" y="9" width="15" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="5dr-8g-kIx"/>
<constraint firstAttribute="width" constant="15" id="k1I-ba-8Nj"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="January 1st, 2018" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="peo-RN-z7p">
<rect key="frame" x="23" y="0.0" width="137" height="15.666666666666666"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="Text"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="9:00 AM" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Apt-wY-ttS">
<rect key="frame" x="23" y="17.333333333333371" width="137" height="15.666666666666664"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" name="Primary"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" name="Background Primary"/>
<constraints>
<constraint firstItem="me9-4K-dS0" firstAttribute="centerY" secondItem="C8A-x8-8TG" secondAttribute="centerY" id="Ptv-cd-e1w"/>
<constraint firstItem="peo-RN-z7p" firstAttribute="top" secondItem="C8A-x8-8TG" secondAttribute="top" id="YL7-OU-RIQ"/>
<constraint firstItem="Apt-wY-ttS" firstAttribute="leading" secondItem="me9-4K-dS0" secondAttribute="trailing" constant="8" id="ZCq-Gp-f3M"/>
<constraint firstAttribute="trailing" secondItem="peo-RN-z7p" secondAttribute="trailing" id="fZX-tG-y6E"/>
<constraint firstAttribute="bottom" secondItem="Apt-wY-ttS" secondAttribute="bottom" id="hDW-Hd-ctD"/>
<constraint firstAttribute="height" constant="33" id="hls-KD-1cF"/>
<constraint firstAttribute="trailing" secondItem="Apt-wY-ttS" secondAttribute="trailing" id="l9T-vX-VBW"/>
<constraint firstAttribute="width" constant="160" id="mLk-eo-x6G"/>
<constraint firstItem="peo-RN-z7p" firstAttribute="leading" secondItem="me9-4K-dS0" secondAttribute="trailing" constant="8" id="qjg-WR-UCo"/>
<constraint firstItem="me9-4K-dS0" firstAttribute="leading" secondItem="C8A-x8-8TG" secondAttribute="leading" id="yO3-ig-Jeh"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Iqe-xC-DYy">
<rect key="frame" x="239" y="15" width="60" height="30"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="100" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3Ew-31-ZWY">
<rect key="frame" x="34" y="6.6666666666666288" width="26" height="17"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
<color key="textColor" name="Text"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Boost Regular" translatesAutoresizingMaskIntoConstraints="NO" id="X4x-5e-3Ms">
<rect key="frame" x="12" y="6" width="14" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="7mC-UE-wq5"/>
<constraint firstAttribute="width" constant="14" id="pwT-kW-wpk"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" name="Background Primary"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="3Ew-31-ZWY" secondAttribute="trailing" id="3Jq-Ho-6AR"/>
<constraint firstAttribute="height" constant="30" id="FpV-XH-nDq"/>
<constraint firstItem="X4x-5e-3Ms" firstAttribute="centerY" secondItem="Iqe-xC-DYy" secondAttribute="centerY" id="GU3-Ll-dxY"/>
<constraint firstItem="3Ew-31-ZWY" firstAttribute="leading" secondItem="X4x-5e-3Ms" secondAttribute="trailing" constant="8" id="Gvp-jb-2L8"/>
<constraint firstItem="3Ew-31-ZWY" firstAttribute="centerY" secondItem="Iqe-xC-DYy" secondAttribute="centerY" id="MhK-X2-0ah"/>
<constraint firstAttribute="width" constant="60" id="zXz-Dr-CWl"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9oD-Y0-ilp">
<rect key="frame" x="307" y="15" width="60" height="30"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="100" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tch-E4-Saw">
<rect key="frame" x="26" y="6.6666666666666288" width="26" height="17"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
<color key="textColor" name="Text"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Star Regular" translatesAutoresizingMaskIntoConstraints="NO" id="B1s-Wp-hBJ">
<rect key="frame" x="3" y="7.6666666666666288" width="15" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="cf2-O1-ELz"/>
<constraint firstAttribute="width" constant="15" id="kiV-NO-p9O"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" name="Background Primary"/>
<gestureRecognizers/>
<constraints>
<constraint firstAttribute="width" constant="60" id="Re8-4t-uoD"/>
<constraint firstAttribute="trailing" secondItem="Tch-E4-Saw" secondAttribute="trailing" constant="8" id="Xty-RA-yBl"/>
<constraint firstItem="Tch-E4-Saw" firstAttribute="centerY" secondItem="9oD-Y0-ilp" secondAttribute="centerY" id="bhF-Xx-ZDe"/>
<constraint firstItem="Tch-E4-Saw" firstAttribute="leading" secondItem="B1s-Wp-hBJ" secondAttribute="trailing" constant="8" id="lvb-ix-ZAw"/>
<constraint firstItem="B1s-Wp-hBJ" firstAttribute="centerY" secondItem="9oD-Y0-ilp" secondAttribute="centerY" id="oWq-Qe-VMg"/>
<constraint firstAttribute="height" constant="30" id="xLI-sT-SnC"/>
</constraints>
<connections>
<outletCollection property="gestureRecognizers" destination="uBg-bz-egu" appends="YES" id="MSk-ph-Hi7"/>
</connections>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FZi-le-bmF">
<rect key="frame" x="171" y="15" width="60" height="30"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="100" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="06U-FB-yto">
<rect key="frame" x="34" y="6.6666666666666288" width="26" height="17"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
<color key="textColor" name="Text"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Message" translatesAutoresizingMaskIntoConstraints="NO" id="Jcf-Cv-8ki">
<rect key="frame" x="11" y="7.6666666666666288" width="15" height="15"/>
<constraints>
<constraint firstAttribute="width" constant="15" id="Vdk-0O-uij"/>
<constraint firstAttribute="height" constant="15" id="iPv-15-UbD"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" name="Background Primary"/>
<gestureRecognizers/>
<constraints>
<constraint firstItem="06U-FB-yto" firstAttribute="leading" secondItem="Jcf-Cv-8ki" secondAttribute="trailing" constant="8" id="7La-R0-13y"/>
<constraint firstItem="06U-FB-yto" firstAttribute="centerY" secondItem="FZi-le-bmF" secondAttribute="centerY" id="HSO-JX-hg7"/>
<constraint firstAttribute="width" constant="60" id="Rnk-TV-JDR"/>
<constraint firstAttribute="height" constant="30" id="X8V-nT-8Ue"/>
<constraint firstItem="Jcf-Cv-8ki" firstAttribute="centerY" secondItem="FZi-le-bmF" secondAttribute="centerY" id="Zzj-qQ-SrD"/>
<constraint firstAttribute="trailing" secondItem="06U-FB-yto" secondAttribute="trailing" id="uJ8-JC-1Ql"/>
</constraints>
<connections>
<outletCollection property="gestureRecognizers" destination="IYd-yl-Al5" appends="YES" id="G65-E0-qae"/>
<outletCollection property="gestureRecognizers" destination="dVp-l7-qxz" appends="YES" id="37g-LW-Ne9"/>
</connections>
</view>
</subviews>
<color key="backgroundColor" name="Background Primary"/>
<constraints>
<constraint firstItem="9oD-Y0-ilp" firstAttribute="centerY" secondItem="HzB-eP-8UY" secondAttribute="centerY" id="1Sb-H7-Gmw"/>
<constraint firstItem="FZi-le-bmF" firstAttribute="centerY" secondItem="HzB-eP-8UY" secondAttribute="centerY" id="6jX-oy-V1j"/>
<constraint firstItem="9oD-Y0-ilp" firstAttribute="leading" secondItem="Iqe-xC-DYy" secondAttribute="trailing" constant="8" id="9H6-Kc-d30"/>
<constraint firstAttribute="height" constant="60" id="9md-oi-Yzv"/>
<constraint firstItem="C8A-x8-8TG" firstAttribute="centerY" secondItem="HzB-eP-8UY" secondAttribute="centerY" id="IS5-BU-DpU"/>
<constraint firstItem="Iqe-xC-DYy" firstAttribute="leading" secondItem="FZi-le-bmF" secondAttribute="trailing" constant="8" id="fvO-Hh-FjR"/>
<constraint firstAttribute="trailing" secondItem="9oD-Y0-ilp" secondAttribute="trailing" constant="8" id="pjV-gq-cic"/>
<constraint firstItem="Iqe-xC-DYy" firstAttribute="centerY" secondItem="HzB-eP-8UY" secondAttribute="centerY" id="srO-bx-F5L"/>
<constraint firstItem="9oD-Y0-ilp" firstAttribute="leading" secondItem="Iqe-xC-DYy" secondAttribute="trailing" constant="8" id="wHS-rp-NaK"/>
<constraint firstItem="C8A-x8-8TG" firstAttribute="leading" secondItem="HzB-eP-8UY" secondAttribute="leading" constant="8" id="xFd-Du-UwS"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mSb-NY-H82">
<rect key="frame" x="0.0" y="615" width="375" height="60"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Replies" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LcE-Gx-SAh">
<rect key="frame" x="15" y="8" width="352" height="52"/>
<fontDescription key="fontDescription" type="system" weight="thin" pointSize="24"/>
<color key="textColor" name="Primary"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" name="Background Secondary"/>
<constraints>
<constraint firstItem="LcE-Gx-SAh" firstAttribute="leading" secondItem="mSb-NY-H82" secondAttribute="leading" constant="15" id="FmJ-qR-aJv"/>
<constraint firstAttribute="trailing" secondItem="LcE-Gx-SAh" secondAttribute="trailing" constant="8" id="PP2-et-MdS"/>
<constraint firstAttribute="height" constant="60" id="Wy9-Mt-14p"/>
<constraint firstAttribute="bottom" secondItem="LcE-Gx-SAh" secondAttribute="bottom" id="jnG-DT-dn4"/>
<constraint firstItem="LcE-Gx-SAh" firstAttribute="top" secondItem="mSb-NY-H82" secondAttribute="top" constant="8" id="saX-wy-fxf"/>
</constraints>
</view>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" name="Background Secondary"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="7I8-6E-s1Q" secondAttribute="trailing" id="5hL-Ma-O1w"/>
<constraint firstItem="C8A-x8-8TG" firstAttribute="top" secondItem="hBh-J5-s0Y" secondAttribute="bottom" constant="15" id="6u3-CR-ugk"/>
<constraint firstItem="7I8-6E-s1Q" firstAttribute="leading" secondItem="Hj7-kC-H7L" secondAttribute="leading" id="7SB-qd-J9a"/>
<constraint firstAttribute="bottomMargin" secondItem="Iqe-xC-DYy" secondAttribute="bottom" constant="8" id="8ha-tf-hUF"/>
<constraint firstItem="9oD-Y0-ilp" firstAttribute="trailing" secondItem="Hj7-kC-H7L" secondAttribute="trailing" constant="-8" id="G9j-ww-Gdd"/>
<constraint firstItem="Iqe-xC-DYy" firstAttribute="leading" secondItem="FZi-le-bmF" secondAttribute="trailing" constant="8" id="LAx-si-6tE"/>
<constraint firstItem="7I8-6E-s1Q" firstAttribute="top" secondItem="Hj7-kC-H7L" secondAttribute="topMargin" constant="10" id="LFk-zl-zWh"/>
<constraint firstAttribute="bottomMargin" secondItem="C8A-x8-8TG" secondAttribute="bottom" constant="8" id="P1P-t1-WWV"/>
<constraint firstItem="C8A-x8-8TG" firstAttribute="leading" secondItem="Hj7-kC-H7L" secondAttribute="leading" constant="8" id="RQp-9M-JGO"/>
<constraint firstItem="9oD-Y0-ilp" firstAttribute="leading" secondItem="Iqe-xC-DYy" secondAttribute="trailing" constant="8" id="aEe-hr-rkn"/>
<constraint firstAttribute="bottomMargin" secondItem="FZi-le-bmF" secondAttribute="bottom" constant="8" id="b5a-AF-czf"/>
<constraint firstItem="9oD-Y0-ilp" firstAttribute="leading" secondItem="Iqe-xC-DYy" secondAttribute="trailing" constant="8" id="eK7-1F-CoL"/>
<constraint firstAttribute="bottom" secondItem="hBh-J5-s0Y" secondAttribute="bottom" id="EyG-sh-GxZ"/>
<constraint firstItem="hBh-J5-s0Y" firstAttribute="top" secondItem="Hj7-kC-H7L" secondAttribute="top" id="Xwy-Y7-gxV"/>
<constraint firstAttribute="trailing" secondItem="hBh-J5-s0Y" secondAttribute="trailing" id="hUd-hg-QQ3"/>
<constraint firstAttribute="bottomMargin" secondItem="9oD-Y0-ilp" secondAttribute="bottom" constant="8" id="jti-av-CLh"/>
<constraint firstItem="hBh-J5-s0Y" firstAttribute="leading" secondItem="Hj7-kC-H7L" secondAttribute="leading" id="pah-y0-owx"/>
<constraint firstItem="hBh-J5-s0Y" firstAttribute="top" secondItem="7I8-6E-s1Q" secondAttribute="bottom" constant="15" id="zWI-ul-ujD"/>
</constraints>
</tableViewCellContentView>
<connections>
@ -1590,15 +1634,17 @@
<outlet property="displayNameLabel" destination="vDe-e6-p1i" id="jxi-k7-Zll"/>
<outlet property="favoritesImageView" destination="B1s-Wp-hBJ" id="hPe-xy-EsI"/>
<outlet property="favoritesLabel" destination="Tch-E4-Saw" id="lly-D4-fkY"/>
<outlet property="inReplyToView" destination="D1b-xI-QXf" id="BGa-wN-bB4"/>
<outlet property="repliesImageView" destination="Jcf-Cv-8ki" id="4Ie-E4-Re9"/>
<outlet property="repliesLabel" destination="06U-FB-yto" id="h7Y-aI-h91"/>
<outlet property="repliesView" destination="mSb-NY-H82" id="bSZ-RQ-5oU"/>
<outlet property="timestampDateLabel" destination="peo-RN-z7p" id="qZb-yJ-U0X"/>
<outlet property="timestampTimeLabel" destination="Apt-wY-ttS" id="UyV-kj-s3w"/>
<outlet property="usernameLabel" destination="8fE-Hr-jgf" id="hiJ-he-cm4"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="StatusTableViewCell" rowHeight="120" id="cLF-Rc-b4K" customClass="StatusTableViewCell" customModule="elpha_ios" customModuleProvider="target">
<rect key="frame" x="0.0" y="610" width="375" height="120"/>
<rect key="frame" x="0.0" y="703" width="375" height="120"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="cLF-Rc-b4K" id="jhE-cB-Cj1">
<rect key="frame" x="0.0" y="0.0" width="375" height="120"/>

1
elpha-ios/InstanceViewController.swift

@ -6,7 +6,6 @@
// Copyright © 2018 Elpha. All rights reserved.
//
import AlamofireImage
import Kingfisher
import UIKit
import SafariServices

2
elpha-ios/MainStatusTableViewCell.swift

@ -23,4 +23,6 @@ class MainStatusTableViewCell: UITableViewCell {
@IBOutlet var timestampTimeLabel: UILabel!
@IBOutlet var attachmentsView: UIView!
@IBOutlet var contentTextView: UITextViewFixed!
@IBOutlet var inReplyToView: UIView!
@IBOutlet var repliesView: UIView!
}

18
elpha-ios/StatusTableViewController.swift

@ -175,6 +175,12 @@ class StatusTableViewController: AbstractStatusTableViewController, UIGestureRec
cell.statusView.topLoadMoreView.isHidden = true
cell.statusView.bottomLoadMoreView.isHidden = true
cell.statusView.replyView.isHidden = true
let statusCount = fetchedResultsController?.fetchedObjects?.count ?? 0
if indexPath.row == statusCount - 1 {
cell.statusView.bottomDividerView.isHidden = true
}
}
func updateMainCell(_ cell: MainStatusTableViewCell, withStatus status: StatusMO) {
@ -237,6 +243,17 @@ class StatusTableViewController: AbstractStatusTableViewController, UIGestureRec
} else {
cell.favoritesImageView.image = UIImage(named: "Star Regular")
}
cell.inReplyToView.isHidden = true
cell.repliesView.isHidden = true
if let ancestors = status.ancestors, ancestors.count > 0 {
cell.inReplyToView.isHidden = false
}
if let descendants = status.descendants, descendants.count > 0 {
cell.repliesView.isHidden = false
}
}
}
@ -341,7 +358,6 @@ extension StatusTableViewController {
updateMainCell(cell, withStatus: status)
cell.contentTextView.delegate = self
return cell
} else {
guard let cell = tableView.dequeueReusableCell(withIdentifier: "StatusTableViewCell", for: indexPath) as? StatusTableViewCell else {

7
elpha-ios/StatusView.xib

@ -53,7 +53,7 @@
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bg1-Q4-Ru5">
<rect key="frame" x="0.0" y="0.0" width="375" height="5"/>
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.93725490199999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" name="Background Secondary"/>
<constraints>
<constraint firstAttribute="height" constant="5" id="hYF-M2-gmn"/>
</constraints>
@ -494,7 +494,7 @@
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="m4t-ve-E78">
<rect key="frame" x="0.0" y="846" width="375" height="5"/>
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.93725490199999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" name="Background Secondary"/>
<constraints>
<constraint firstAttribute="height" priority="999" constant="5" id="QFa-Y9-r5a"/>
</constraints>
@ -584,6 +584,9 @@
<image name="Pin" width="29" height="50"/>
<image name="Star Regular" width="22" height="22"/>
<image name="Up" width="25" height="25"/>
<namedColor name="Background Secondary">
<color red="0.93725490196078431" green="0.93725490196078431" blue="0.93725490196078431" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="Primary">
<color red="0.32549019607843138" green="0.20392156862745098" blue="0.55686274509803924" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>

13
elpha-ios/TimelineTableViewController.swift

@ -84,15 +84,24 @@ class TimelineTableViewController: AbstractStatusTableViewController {
override func loadMoreTapped(status: StatusMO, direction: PaginationDirection) {
if let markers = status.markers {
markers.forEach { marker in
var removeAt = -1
for (index, marker) in markers.enumerated() {
if marker.context == self.currentPaginationContext && marker.item.direction == direction {
fetchTimeline(withPagination: marker.item) { error in
if error != nil {
if error == nil {
removeAt = index
} else {
AlertManager.shared.show(message: error!.localizedDescription, category: .error)
}
}
}
}
if removeAt > -1 {
status.markers?.remove(at: removeAt)
CoreDataManager.shared.saveContext()
}
}
}

Loading…
Cancel
Save