[+] Implement leave family
This commit is contained in:
@@ -260,6 +260,21 @@ class FamilyVC: UIViewController
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Called when the user clicks the leave family button
|
||||
*/
|
||||
@IBAction func btnLeave(_ sender: Any)
|
||||
{
|
||||
enterPin()
|
||||
{
|
||||
self.sendReq(APIs.familyChangePin, title: "Leaving...", params: ["pin": $0]) { it in
|
||||
|
||||
localStorage.removeObject(forKey: "family")
|
||||
self.msg("Leave Success!", "You left the family.")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1086,9 +1086,12 @@
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="De7-dU-p8j">
|
||||
<rect key="frame" x="0.0" y="40" width="374" height="30"/>
|
||||
<state key="normal" title="Delete Family">
|
||||
<state key="normal" title="Leave Family">
|
||||
<color key="titleColor" systemColor="systemRedColor"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="btnLeave:" destination="4ss-Ye-Da4" eventType="touchUpInside" id="YMe-ri-xkZ"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
</stackView>
|
||||
|
||||
Reference in New Issue
Block a user