Переглянути джерело

update fix bugs for release 5.0.48

alqindiirsyam 1 місяць тому
батько
коміт
36accd96c5

+ 4 - 4
AppBuilder/AppBuilder.xcodeproj/project.pbxproj

@@ -564,7 +564,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 5.0.47;
+				MARKETING_VERSION = 5.0.48;
 				PRODUCT_BUNDLE_IDENTIFIER = io.nexilis.appbuilder;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
@@ -600,7 +600,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 5.0.47;
+				MARKETING_VERSION = 5.0.48;
 				PRODUCT_BUNDLE_IDENTIFIER = io.nexilis.appbuilder;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
@@ -636,7 +636,7 @@
 					"@executable_path/../../Frameworks",
 				);
 				LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
-				MARKETING_VERSION = 5.0.47;
+				MARKETING_VERSION = 5.0.48;
 				OTHER_CFLAGS = "-fstack-protector-strong";
 				PRODUCT_BUNDLE_IDENTIFIER = io.nexilis.appbuilder.AppBuilderShare;
 				PRODUCT_NAME = "$(TARGET_NAME)";
@@ -675,7 +675,7 @@
 					"@executable_path/../../Frameworks",
 				);
 				LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
-				MARKETING_VERSION = 5.0.47;
+				MARKETING_VERSION = 5.0.48;
 				OTHER_CFLAGS = "-fstack-protector-strong";
 				PRODUCT_BUNDLE_IDENTIFIER = io.nexilis.appbuilder.AppBuilderShare;
 				PRODUCT_NAME = "$(TARGET_NAME)";

+ 3 - 256
AppBuilder/AppBuilder/Base.lproj/Main.storyboard

@@ -1,149 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="nD6-T3-59p">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="nD6-T3-59p">
     <device id="retina6_7" orientation="portrait" appearance="dark"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
-        <!--Item 2-->
-        <scene sceneID="3Wf-gK-qyG">
-            <objects>
-                <viewController id="yL2-sh-r2b" sceneMemberID="viewController">
-                    <view key="view" contentMode="scaleToFill" id="Cwo-Ej-asl">
-                        <rect key="frame" x="0.0" y="0.0" width="430" height="932"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <viewLayoutGuide key="safeArea" id="NCr-Sf-zM1"/>
-                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                    </view>
-                    <tabBarItem key="tabBarItem" title="Item 2" id="3tr-an-hLR"/>
-                </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="Fum-Sw-dKP" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="-94" y="525"/>
-        </scene>
-        <!--First Tab View Controller-->
-        <scene sceneID="bNR-du-k4c">
-            <objects>
-                <viewController storyboardIdentifier="firstTabVC" useStoryboardIdentifierAsRestorationIdentifier="YES" id="iKy-YH-N88" customClass="FirstTabViewController" customModule="AppBuilder" customModuleProvider="target" sceneMemberID="viewController">
-                    <view key="view" contentMode="scaleToFill" id="OUO-5T-AtV">
-                        <rect key="frame" x="0.0" y="0.0" width="430" height="932"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <viewLayoutGuide key="safeArea" id="f2x-TV-t0G"/>
-                    </view>
-                </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="1UN-B6-dct" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="-772" y="1185"/>
-        </scene>
-        <!--Second Tab View Controller-->
-        <scene sceneID="JH2-j3-Jce">
-            <objects>
-                <viewController storyboardIdentifier="secondTabVC" useStoryboardIdentifierAsRestorationIdentifier="YES" id="z6f-Hz-Xwh" customClass="SecondTabViewController" customModule="AppBuilder" customModuleProvider="target" sceneMemberID="viewController">
-                    <view key="view" contentMode="scaleToFill" id="T1X-gt-fSN">
-                        <rect key="frame" x="0.0" y="0.0" width="430" height="932"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="BU2-P5-16y">
-                                <rect key="frame" x="0.0" y="0.0" width="430" height="932"/>
-                            </imageView>
-                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oT8-Uw-cgS">
-                                <rect key="frame" x="0.0" y="59" width="430" height="839"/>
-                                <subviews>
-                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PgW-Nv-Scf">
-                                        <rect key="frame" x="0.0" y="0.0" width="430" height="45"/>
-                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                        <constraints>
-                                            <constraint firstAttribute="height" constant="45" id="VqH-jB-6ui"/>
-                                        </constraints>
-                                    </view>
-                                    <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="4Jc-b8-aeF">
-                                        <rect key="frame" x="0.0" y="45" width="430" height="794"/>
-                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                        <prototypes>
-                                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="reuseIdentifierChat" id="Tz5-0s-zFj">
-                                                <rect key="frame" x="0.0" y="50" width="430" height="43.666667938232422"/>
-                                                <autoresizingMask key="autoresizingMask"/>
-                                                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Tz5-0s-zFj" id="4MW-eb-afV">
-                                                    <rect key="frame" x="0.0" y="0.0" width="430" height="43.666667938232422"/>
-                                                    <autoresizingMask key="autoresizingMask"/>
-                                                </tableViewCellContentView>
-                                            </tableViewCell>
-                                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="reuseIdentifierGroup" id="im7-ks-lTd">
-                                                <rect key="frame" x="0.0" y="93.666667938232422" width="430" height="43.666667938232422"/>
-                                                <autoresizingMask key="autoresizingMask"/>
-                                                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="im7-ks-lTd" id="lNo-4T-eyr">
-                                                    <rect key="frame" x="0.0" y="0.0" width="430" height="43.666667938232422"/>
-                                                    <autoresizingMask key="autoresizingMask"/>
-                                                </tableViewCellContentView>
-                                            </tableViewCell>
-                                        </prototypes>
-                                        <connections>
-                                            <outlet property="dataSource" destination="z6f-Hz-Xwh" id="AOZ-F1-Rhe"/>
-                                            <outlet property="delegate" destination="z6f-Hz-Xwh" id="rwB-hc-wXw"/>
-                                        </connections>
-                                    </tableView>
-                                </subviews>
-                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                <constraints>
-                                    <constraint firstAttribute="bottom" secondItem="4Jc-b8-aeF" secondAttribute="bottom" id="AJg-3y-ycq"/>
-                                    <constraint firstAttribute="trailing" secondItem="4Jc-b8-aeF" secondAttribute="trailing" id="MQg-wg-wJC"/>
-                                    <constraint firstItem="4Jc-b8-aeF" firstAttribute="top" secondItem="PgW-Nv-Scf" secondAttribute="bottom" id="ZUd-zw-4hy"/>
-                                    <constraint firstItem="4Jc-b8-aeF" firstAttribute="leading" secondItem="oT8-Uw-cgS" secondAttribute="leading" id="gr8-uB-Kjv"/>
-                                    <constraint firstItem="PgW-Nv-Scf" firstAttribute="leading" secondItem="oT8-Uw-cgS" secondAttribute="leading" id="npT-Gf-5EX"/>
-                                    <constraint firstItem="PgW-Nv-Scf" firstAttribute="top" secondItem="oT8-Uw-cgS" secondAttribute="top" id="od8-UY-wE5"/>
-                                    <constraint firstAttribute="trailing" secondItem="PgW-Nv-Scf" secondAttribute="trailing" id="yEI-vY-L8E"/>
-                                </constraints>
-                            </view>
-                        </subviews>
-                        <viewLayoutGuide key="safeArea" id="Exo-M2-oVn"/>
-                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                        <constraints>
-                            <constraint firstItem="BU2-P5-16y" firstAttribute="top" secondItem="T1X-gt-fSN" secondAttribute="top" id="6kj-QA-eHg"/>
-                            <constraint firstItem="oT8-Uw-cgS" firstAttribute="leading" secondItem="Exo-M2-oVn" secondAttribute="leading" id="9FF-6z-ROG"/>
-                            <constraint firstItem="oT8-Uw-cgS" firstAttribute="top" secondItem="Exo-M2-oVn" secondAttribute="top" id="CvI-hv-hNw"/>
-                            <constraint firstItem="Exo-M2-oVn" firstAttribute="bottom" secondItem="oT8-Uw-cgS" secondAttribute="bottom" id="Imt-VX-VR1"/>
-                            <constraint firstItem="BU2-P5-16y" firstAttribute="leading" secondItem="Exo-M2-oVn" secondAttribute="leading" id="L9z-Na-Kbb"/>
-                            <constraint firstItem="Exo-M2-oVn" firstAttribute="trailing" secondItem="BU2-P5-16y" secondAttribute="trailing" id="Udn-OO-sE2"/>
-                            <constraint firstItem="oT8-Uw-cgS" firstAttribute="trailing" secondItem="Exo-M2-oVn" secondAttribute="trailing" id="Vck-XN-acd"/>
-                            <constraint firstAttribute="bottom" secondItem="BU2-P5-16y" secondAttribute="bottom" id="jai-lq-WbQ"/>
-                        </constraints>
-                    </view>
-                    <connections>
-                        <outlet property="backgroundImage" destination="BU2-P5-16y" id="gud-Yi-EyH"/>
-                        <outlet property="heightToolbar" destination="VqH-jB-6ui" id="pWl-cH-S6S"/>
-                        <outlet property="tableView" destination="4Jc-b8-aeF" id="kie-X3-tsw"/>
-                        <outlet property="viewToolbar" destination="PgW-Nv-Scf" id="z5k-Qe-iDz"/>
-                    </connections>
-                </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="iEb-Pf-p13" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="-94.20289855072464" y="1184.5982142857142"/>
-        </scene>
-        <!--Item 1-->
-        <scene sceneID="N8z-aZ-R0C">
-            <objects>
-                <viewController id="shx-A0-Rpw" sceneMemberID="viewController">
-                    <view key="view" contentMode="scaleToFill" id="0VY-c7-1YL">
-                        <rect key="frame" x="0.0" y="0.0" width="430" height="932"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <viewLayoutGuide key="safeArea" id="cTG-dq-upN"/>
-                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                    </view>
-                    <tabBarItem key="tabBarItem" title="Item 1" id="p7E-Es-Ytv"/>
-                </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="ea8-TI-6Jg" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="-772" y="525"/>
-        </scene>
         <!--test-->
         <scene sceneID="P0z-HA-ArT">
             <objects>
                 <navigationController title="test" id="nD6-T3-59p" sceneMemberID="viewController">
                     <navigationBar key="navigationBar" opaque="NO" contentMode="scaleToFill" id="mEs-FV-nQc">
-                        <rect key="frame" x="0.0" y="59" width="430" height="44"/>
+                        <rect key="frame" x="0.0" y="118" width="430" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
                         <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -176,132 +45,10 @@
                         <autoresizingMask key="autoresizingMask"/>
                         <color key="barTintColor" white="0.91082411545973563" alpha="1" colorSpace="calibratedWhite"/>
                     </tabBar>
-                    <connections>
-                        <segue destination="shx-A0-Rpw" kind="relationship" relationship="viewControllers" id="InU-1A-5CF"/>
-                        <segue destination="yL2-sh-r2b" kind="relationship" relationship="viewControllers" id="2uQ-yM-Uwx"/>
-                        <segue destination="BQG-BK-XdT" kind="relationship" relationship="viewControllers" id="xa0-0l-EhV"/>
-                        <segue destination="HRs-yQ-che" kind="relationship" relationship="viewControllers" id="H7y-1o-pCn"/>
-                        <segue destination="doo-wB-Xef" kind="relationship" relationship="viewControllers" id="XZ7-g3-417"/>
-                    </connections>
                 </tabBarController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="xVj-nd-1u2" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
             </objects>
             <point key="canvasLocation" x="619" y="-202"/>
         </scene>
-        <!--Item 3-->
-        <scene sceneID="akE-9q-KIu">
-            <objects>
-                <viewController id="BQG-BK-XdT" userLabel="Item 3" sceneMemberID="viewController">
-                    <view key="view" contentMode="scaleToFill" id="tfu-1X-nbl">
-                        <rect key="frame" x="0.0" y="0.0" width="430" height="932"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <viewLayoutGuide key="safeArea" id="5ym-td-Khs"/>
-                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                    </view>
-                    <tabBarItem key="tabBarItem" title="Item 3" id="fhU-xt-rD1" userLabel="Item 3"/>
-                </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="dEh-1z-WOg" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="619" y="525"/>
-        </scene>
-        <!--Item 4-->
-        <scene sceneID="ayN-8g-7Qb">
-            <objects>
-                <viewController id="HRs-yQ-che" userLabel="Item 4" sceneMemberID="viewController">
-                    <view key="view" contentMode="scaleToFill" id="CpP-4M-jQO">
-                        <rect key="frame" x="0.0" y="0.0" width="430" height="932"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <viewLayoutGuide key="safeArea" id="FW7-Pt-spm"/>
-                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                    </view>
-                    <tabBarItem key="tabBarItem" title="Item 4" id="9HE-z6-qW3" userLabel="Item 4"/>
-                </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="kTc-lt-5jQ" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="1293" y="525"/>
-        </scene>
-        <!--Item 5-->
-        <scene sceneID="1OZ-lX-QwV">
-            <objects>
-                <viewController id="doo-wB-Xef" userLabel="Item 5" sceneMemberID="viewController">
-                    <view key="view" contentMode="scaleToFill" id="gva-IL-Ua7">
-                        <rect key="frame" x="0.0" y="0.0" width="430" height="932"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <viewLayoutGuide key="safeArea" id="b9A-7D-aDQ"/>
-                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                    </view>
-                    <tabBarItem key="tabBarItem" title="Item 5" id="aDp-Df-R88" userLabel="Item 5"/>
-                </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="pku-2n-PfH" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="2017" y="525"/>
-        </scene>
-        <!--Third Tab View Controller-->
-        <scene sceneID="2tv-T7-3Gz">
-            <objects>
-                <viewController storyboardIdentifier="thirdTabVC" useStoryboardIdentifierAsRestorationIdentifier="YES" id="sim-nJ-liW" customClass="ThirdTabViewController" customModule="AppBuilder" customModuleProvider="target" sceneMemberID="viewController">
-                    <view key="view" contentMode="scaleToFill" id="zlx-Nr-4qk">
-                        <rect key="frame" x="0.0" y="0.0" width="430" height="932"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <viewLayoutGuide key="safeArea" id="gQh-2u-SN6"/>
-                    </view>
-                </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="crD-Us-xmX" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="619" y="1185"/>
-        </scene>
-        <!--Fourth Tab View Controller-->
-        <scene sceneID="ZzT-E6-umc">
-            <objects>
-                <viewController storyboardIdentifier="fourthTabVC" useStoryboardIdentifierAsRestorationIdentifier="YES" id="ruc-qb-tdV" customClass="FourthTabViewController" customModule="AppBuilder" customModuleProvider="target" sceneMemberID="viewController">
-                    <view key="view" contentMode="scaleToFill" id="9o3-Cd-xmC">
-                        <rect key="frame" x="0.0" y="0.0" width="430" height="932"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="rdi-Bn-gaF">
-                                <rect key="frame" x="0.0" y="0.0" width="430" height="932"/>
-                            </imageView>
-                            <tableView opaque="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" bouncesZoom="NO" dataMode="prototypes" style="insetGrouped" separatorStyle="default" separatorInsetReference="fromAutomaticInsets" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="5" sectionFooterHeight="5" translatesAutoresizingMaskIntoConstraints="NO" id="gUO-Ws-n00">
-                                <rect key="frame" x="0.0" y="80" width="430" height="813"/>
-                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                <inset key="separatorInset" minX="3" minY="0.0" maxX="0.0" maxY="0.0"/>
-                                <color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                <prototypes>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="2" reuseIdentifier="reuseIdentifier" id="IEo-SX-4um">
-                                        <rect key="frame" x="20" y="55.333332061767578" width="390" height="43.666667938232422"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="IEo-SX-4um" id="je4-kr-tvF">
-                                            <rect key="frame" x="0.0" y="0.0" width="390" height="43.666667938232422"/>
-                                            <autoresizingMask key="autoresizingMask"/>
-                                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                            <edgeInsets key="layoutMargins" top="0.0" left="0.0" bottom="0.0" right="0.0"/>
-                                        </tableViewCellContentView>
-                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                    </tableViewCell>
-                                </prototypes>
-                            </tableView>
-                        </subviews>
-                        <viewLayoutGuide key="safeArea" id="SgQ-c4-v3h"/>
-                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                        <constraints>
-                            <constraint firstItem="rdi-Bn-gaF" firstAttribute="top" secondItem="9o3-Cd-xmC" secondAttribute="top" id="3iG-Qg-ugF"/>
-                            <constraint firstItem="SgQ-c4-v3h" firstAttribute="bottom" secondItem="gUO-Ws-n00" secondAttribute="bottom" constant="5" id="cJW-F2-vbP"/>
-                            <constraint firstItem="gUO-Ws-n00" firstAttribute="top" secondItem="9o3-Cd-xmC" secondAttribute="top" constant="80" id="dgB-Kt-3hN"/>
-                            <constraint firstAttribute="bottom" secondItem="rdi-Bn-gaF" secondAttribute="bottom" id="i6c-Au-25J"/>
-                            <constraint firstItem="SgQ-c4-v3h" firstAttribute="trailing" secondItem="rdi-Bn-gaF" secondAttribute="trailing" id="ka4-Ak-VDR"/>
-                            <constraint firstItem="gUO-Ws-n00" firstAttribute="trailing" secondItem="SgQ-c4-v3h" secondAttribute="trailing" id="suE-CO-UTB"/>
-                            <constraint firstItem="rdi-Bn-gaF" firstAttribute="leading" secondItem="SgQ-c4-v3h" secondAttribute="leading" id="wzr-gR-Yrs"/>
-                            <constraint firstItem="gUO-Ws-n00" firstAttribute="leading" secondItem="SgQ-c4-v3h" secondAttribute="leading" id="xiY-lp-lrd"/>
-                        </constraints>
-                    </view>
-                    <connections>
-                        <outlet property="backgroundImage" destination="rdi-Bn-gaF" id="MAO-jC-VP5"/>
-                        <outlet property="tableView" destination="gUO-Ws-n00" id="8ZB-Pu-MLW"/>
-                    </connections>
-                </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="R3B-ld-vod" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="1293" y="1184"/>
-        </scene>
     </scenes>
 </document>

+ 22 - 2
AppBuilder/AppBuilder/FourthTabViewController.swift

@@ -24,14 +24,16 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
     var switchSaveToGallery = UISwitch()
     var switchAutoDownload = UISwitch()
     
-    @IBOutlet weak var tableView: UITableView!
-    @IBOutlet weak var backgroundImage: UIImageView!
+    var tableView: UITableView!
+    var backgroundImage: UIImageView!
     
     var notInTab = false
     
     public override func viewDidLoad() {
         super.viewDidLoad()
         
+        initAllViews()
+        
         self.view.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .black : .white
         self.navigationController?.navigationBar.topItem?.backButtonTitle = ""
         
@@ -301,6 +303,24 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
         tableView.reloadData()
     }
     
+    private func initAllViews() {
+        backgroundImage = UIImageView()
+        self.view.addSubview(backgroundImage)
+        backgroundImage.anchor(top: self.view.topAnchor, left: self.view.leftAnchor, bottom: self.view.bottomAnchor, right: self.view.rightAnchor)
+        
+        tableView = UITableView()
+        tableView.register(UITableViewCell.self, forCellReuseIdentifier: "reuseIdentifier")
+        self.view.addSubview(tableView)
+        tableView.anchor(top: self.view.safeAreaLayoutGuide.topAnchor, left: self.view.leftAnchor, bottom: self.view.bottomAnchor, right: self.view.rightAnchor)
+        tableView.tableFooterView = UIView()
+        tableView.sectionHeaderHeight = 2
+        tableView.sectionFooterHeight = 2
+        tableView.automaticallyAdjustsScrollIndicatorInsets = false
+        if #available(iOS 15.0, *) {
+            tableView.sectionHeaderTopPadding = 0
+        }
+    }
+    
     override public func viewWillAppear(_ animated: Bool) {
 //        self.navigationController?.navigationBar.topItem?.title = ""
         self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: self.traitCollection.userInterfaceStyle == .dark ? .white : UIColor.black]

+ 36 - 6
AppBuilder/AppBuilder/SecondTabViewController.swift

@@ -46,8 +46,12 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
     let buttonImageVoiceSb = UIButton(type: .custom)
     let imageNewChatSb = UIImageView()
     let buttonImageClearSearch = UIButton(type: .custom)
-    @IBOutlet weak var viewToolbar: UIView!
-    @IBOutlet weak var heightToolbar: NSLayoutConstraint!
+    
+    var viewToolbar: UIView!
+    var heightToolbar: NSLayoutConstraint!
+    var tableView: UITableView!
+    var backgroundImage: UIImageView!
+    
     var viewCategorySearch: UIScrollView!
     var leftTVSearch: NSLayoutConstraint!
     var viewCatInTV: UIView!
@@ -106,7 +110,6 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         return !textViewSearch.text!.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
 //        return !isSearchBarEmpty
     }
-    @IBOutlet var tableView: UITableView!
     
     var speechRecognizer = SFSpeechRecognizer(locale: Locale(identifier: "id"))
 
@@ -188,6 +191,7 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
     
     override func viewDidLoad() {
         super.viewDidLoad()
+        initAllViews()
         let me = User.getMyPin()!
         Database.shared.database?.inTransaction({ fmdb, rollback in
             if let cursor = Database.shared.getRecords(fmdb: fmdb, query: "select FIRST_NAME, LAST_NAME, IMAGE_ID, USER_TYPE from BUDDY where F_PIN = '\(me)'"), cursor.next() {
@@ -355,7 +359,6 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         }
         
         pullBuddy()
-        navigationController?.setNavigationBarHidden(true, animated: false)
         
         let tapGesture = UITapGestureRecognizer(target: self, action: #selector(collapseDocked))
         tapGesture.cancelsTouchesInView = false
@@ -363,6 +366,35 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         self.view.addGestureRecognizer(tapGesture)
     }
     
+    private func initAllViews() {
+        backgroundImage = UIImageView()
+        self.view.addSubview(backgroundImage)
+        backgroundImage.anchor(top: self.view.topAnchor, left: self.view.leftAnchor, bottom: self.view.bottomAnchor, right: self.view.rightAnchor)
+        
+        viewToolbar = UIView()
+        self.view.addSubview(viewToolbar)
+        viewToolbar.anchor(top: self.view.safeAreaLayoutGuide.topAnchor, left: self.view.leftAnchor, right: self.view.rightAnchor)
+        
+        heightToolbar = self.viewToolbar.heightAnchor.constraint(equalToConstant: 45)
+        heightToolbar.isActive = true
+        
+        tableView = UITableView()
+        tableView.register(UITableViewCell.self, forCellReuseIdentifier: "reuseIdentifierChat")
+        tableView.register(UITableViewCell.self, forCellReuseIdentifier: "reuseIdentifierGroup")
+        tableView.register(UITableViewCell.self, forCellReuseIdentifier: "reuseIdentifierContact")
+        self.view.addSubview(tableView)
+        tableView.anchor(top: viewToolbar.bottomAnchor, left: self.view.leftAnchor, bottom: self.view.bottomAnchor, right: self.view.rightAnchor)
+        tableView.dataSource = self
+        tableView.delegate = self
+        tableView.tableFooterView = UIView()
+        tableView.sectionHeaderHeight = 0
+        tableView.sectionFooterHeight = 0
+        tableView.automaticallyAdjustsScrollIndicatorInsets = false
+        if #available(iOS 15.0, *) {
+            tableView.sectionHeaderTopPadding = 0
+        }
+    }
+    
     @objc func collapseDocked() {
         if ViewController.isExpandButton {
             ViewController.expandButton()
@@ -1122,8 +1154,6 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
             completion(result)
         }
     }
-
-    @IBOutlet weak var backgroundImage: UIImageView!
     
 
     /*

+ 59 - 27
AppBuilder/AppBuilder/ViewController.swift

@@ -30,10 +30,10 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
     var buttonCCGR : UITapGestureRecognizer?
     var buttonStreamGR : UITapGestureRecognizer?
     var floating : FloatingButton?
-    var firstTab : FirstTabViewController?
-    var secondTab : SecondTabViewController?
-    var thirdTab : ThirdTabViewController?
-    var fourthTab : FourthTabViewController?
+    var firstTab : UINavigationController?
+    var secondTab : UINavigationController?
+    var thirdTab : UINavigationController?
+    var fourthTab : UINavigationController?
     var callTab : UINavigationController?
     var chatWATab : UINavigationController?
     var communityTab : UINavigationController?
@@ -93,10 +93,10 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
         let customTab = PrefsUtil.getCustomTab().split(separator: ",")
         let cpaasMode = PrefsUtil.getCpaasMode()
         var tabs : [UIViewController] = []
-        firstTab = storyboard?.instantiateViewController(withIdentifier: "firstTabVC") as? FirstTabViewController
-        secondTab = storyboard?.instantiateViewController(withIdentifier: "secondTabVC") as? SecondTabViewController
-        thirdTab = storyboard?.instantiateViewController(withIdentifier: "thirdTabVC") as? ThirdTabViewController
-        fourthTab = storyboard?.instantiateViewController(withIdentifier: "fourthTabVC") as? FourthTabViewController
+        firstTab = UINavigationController(rootViewController: FirstTabViewController())
+        secondTab = UINavigationController(rootViewController: SecondTabViewController())
+        thirdTab = UINavigationController(rootViewController: ThirdTabViewController())
+        fourthTab = UINavigationController(rootViewController: FourthTabViewController())
         callTab = UINavigationController(rootViewController: CallLogVC())
         chatWATab = UINavigationController(rootViewController: ChatWALikeVC())
         communityTab = UINavigationController(rootViewController: CommunityList())
@@ -253,8 +253,8 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
 //            navigationController?.setNavigationBarHidden(true, animated: false)
 //        }
         
-        self.selectedIndex = Utils.getLastTabSelected()
         self.setViewControllers(tabs, animated: false)
+        self.selectedIndex = Utils.getLastTabSelected()
         if(cpaasMode == PrefsUtil.CPAAS_MODE_DOCKED || cpaasMode == PrefsUtil.CPAAS_MODE_MIX){
             if(customTab.count == 3){
                 self.tabBar.items?[1].isEnabled = false
@@ -401,7 +401,7 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
             return
         }
         if self.viewControllers?.firstIndex(of: fourthTab!) == nil {
-            let vc = fourthTab!
+            let vc = FourthTabViewController()
             vc.notInTab = true
             Nexilis.floatingButton.isHidden = true
             self.navigationController?.show(vc, sender: nil)
@@ -419,10 +419,14 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
             alertChangeProfile = LibAlertController(title: "Set Profile".localized(), message: "You must set your profile to use this feature".localized(), preferredStyle: .alert)
             alertChangeProfile.addAction(UIAlertAction(title: "Cancel".localized(), style: .destructive, handler: {_ in
                 if ViewController.def?.viewControllers?.firstIndex(of: (ViewController.def?.firstTab)!) == ViewController.def?.selectedIndex {
-                    ViewController.def?.firstTab?.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
+                    if let wv = ViewController.def?.firstTab?.viewControllers.first as? FirstTabViewController {
+                        wv.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
+                    }
                 }
                 if ViewController.def?.viewControllers?.firstIndex(of: (ViewController.def?.thirdTab)!) == ViewController.def?.selectedIndex {
-                    ViewController.def?.thirdTab?.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
+                    if let wv = ViewController.def?.thirdTab?.viewControllers.first as? ThirdTabViewController {
+                        wv.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
+                    }
                 }
             }))
             alertChangeProfile.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
@@ -445,8 +449,12 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 ViewController.def?.show(b: false)
-                ViewController.def?.thirdTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
-                ViewController.def?.firstTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
+                if let wv1 = ViewController.def?.firstTab?.viewControllers.first as? FirstTabViewController {
+                    wv1.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
+                }
+                if let wv3 = ViewController.def?.thirdTab?.viewControllers.first as? ThirdTabViewController {
+                    wv3.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
+                }
                 let rootVC = UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController
                 if rootVC?.presentedViewController == nil {
                     rootVC?.present(navigationController, animated: true, completion: nil)
@@ -631,7 +639,8 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
         if viewController != secondTab {
             let idxTabChat = self.viewControllers?.firstIndex(where: {$0 == secondTab})
             if idxTabChat != nil {
-                let vcTabChats = self.viewControllers![idxTabChat!] as! SecondTabViewController
+                let navTabs = self.viewControllers![idxTabChat!] as! UINavigationController
+                let vcTabChats = navTabs.viewControllers.first as! SecondTabViewController
                 if vcTabChats.searchController.isActive {
                     vcTabChats.searchController.isActive = false
                 }
@@ -640,6 +649,7 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
     }
     
     override func viewWillAppear(_ animated: Bool) {
+        navigationController?.setNavigationBarHidden(true, animated: false)
         if !firstLoad {
             willappear()
         } else {
@@ -925,8 +935,12 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
         //print("ccTap")
         if(ViewController.checkIsChangePerson()){
             show(b: false)
-            ViewController.def?.thirdTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
-            ViewController.def?.firstTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
+            if let wv1 = ViewController.def?.firstTab?.viewControllers.first as? FirstTabViewController {
+                wv1.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
+            }
+            if let wv3 = ViewController.def?.thirdTab?.viewControllers.first as? ThirdTabViewController {
+                wv3.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
+            }
             if ViewController.listPullFB.count != 0 && ViewController.listPullFB.count > 2 {
                 let package_id = ViewController.listPullFB[2].split(separator: "|")[0]
                 var app_id = ""
@@ -957,8 +971,12 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
         //print("streamTap")
         if(ViewController.checkIsChangePerson()){
             show(b: false)
-            ViewController.def?.thirdTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
-            ViewController.def?.firstTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
+            if let wv1 = ViewController.def?.firstTab?.viewControllers.first as? FirstTabViewController {
+                wv1.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
+            }
+            if let wv3 = ViewController.def?.thirdTab?.viewControllers.first as? ThirdTabViewController {
+                wv3.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
+            }
             if ViewController.listPullFB.count != 0 && ViewController.listPullFB.count > 4 {
                 let package_id = ViewController.listPullFB[4].split(separator: "|")[0]
                 var app_id = ""
@@ -989,8 +1007,12 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
         //print("callTap")
         if(ViewController.checkIsChangePerson()){
             show(b: false)
-            ViewController.def?.thirdTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
-            ViewController.def?.firstTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
+            if let wv1 = ViewController.def?.firstTab?.viewControllers.first as? FirstTabViewController {
+                wv1.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
+            }
+            if let wv3 = ViewController.def?.thirdTab?.viewControllers.first as? ThirdTabViewController {
+                wv3.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
+            }
             if ViewController.listPullFB.count != 0 && ViewController.listPullFB.count > 1 {
                 let package_id = ViewController.listPullFB[1].split(separator: "|")[0]
                 var app_id = ""
@@ -1023,8 +1045,12 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
 //        return
         if(ViewController.checkIsChangePerson()){
             show(b: false)
-            ViewController.def?.thirdTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
-            ViewController.def?.firstTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
+            if let wv1 = ViewController.def?.firstTab?.viewControllers.first as? FirstTabViewController {
+                wv1.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
+            }
+            if let wv3 = ViewController.def?.thirdTab?.viewControllers.first as? ThirdTabViewController {
+                wv3.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
+            }
             if ViewController.listPullFB.count != 0 && ViewController.listPullFB.count > 0 {
                 let package_id = ViewController.listPullFB[0].split(separator: "|")[0]
                 var app_id = ""
@@ -1054,8 +1080,12 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
     @objc func postTap() {
         if(ViewController.checkIsChangePerson()){
             show(b: false)
-            ViewController.def?.thirdTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
-            ViewController.def?.firstTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
+            if let wv1 = ViewController.def?.firstTab?.viewControllers.first as? FirstTabViewController {
+                wv1.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
+            }
+            if let wv3 = ViewController.def?.thirdTab?.viewControllers.first as? ThirdTabViewController {
+                wv3.webView?.evaluateJavaScript("if(resumeAll){resumeAll();}")
+            }
             if ViewController.listPullFB.count != 0 && ViewController.listPullFB.count > 3 {
                 let package_id = ViewController.listPullFB[3].split(separator: "|")[0]
                 var app_id = ""
@@ -1108,8 +1138,10 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
             DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + .seconds(1), execute: {
                 let me = User.getMyPin()
                 let address = "\(PrefsUtil.getURLBase())nexilis/pages/tab5-new-post?f_pin=\(me ?? "")"
-                self.thirdTab?.webView.evaluateJavaScript("{window.localStorage.setItem('currentTab','\(ViewController.tab3)')}")
-                self.thirdTab?.webView.evaluateJavaScript("window.location = '\(address)'")
+                if let wv3 = ViewController.def?.thirdTab?.viewControllers.first as? ThirdTabViewController {
+                    wv3.webView.evaluateJavaScript("{window.localStorage.setItem('currentTab','\(ViewController.tab3)')}")
+                    wv3.webView.evaluateJavaScript("window.location = '\(address)'")
+                }
                 
             })
         }

+ 1 - 1
NexilisLite/NexilisLite/Source/Callback.swift

@@ -35,7 +35,7 @@ class Callback : CallBack {
     }
     
     func callStateChanged(nState: Int!, sMessage: String!) -> Int {
-        print(nState,"/",sMessage)
+//        print(nState,"/",sMessage)
         if nState == Nexilis.AUDIO_CALL_INCOMING || nState == Nexilis.VIDEO_CALL_INCOMING {
             if let delegate = Nexilis.shared.callDelegate {
                 if !Nexilis.showLibraryNotification || Nexilis.callAPNActivated {

+ 5 - 2
NexilisLite/NexilisLite/Source/Nexilis.swift

@@ -19,7 +19,7 @@ import CryptoKit
 import WebKit
 
 public class Nexilis: NSObject {
-    public static var cpaasVersion = "5.0.47"
+    public static var cpaasVersion = "5.0.48"
     public static var sAPIKey = ""
     
     public static var ADDRESS = ""
@@ -1976,7 +1976,10 @@ public class Nexilis: NSObject {
                 print("Access database error: \(error.localizedDescription)")
             }
         }
-        let pin = lPin == me ? fPin : lPin
+        var pin = lPin == me ? fPin : lPin
+        if !chatId.isEmpty {
+            pin = chatId
+        }
         var pinned = 0
         var archived = 0
         if fmdb == nil {

+ 5 - 1
NexilisLite/NexilisLite/Source/View/Call/QmeraAudioViewController.swift

@@ -1090,7 +1090,11 @@ class QmeraAudioViewController: UIViewController {
             else if state == Nexilis.AUDIO_VIDEO_CALL_MUTED {
                 DispatchQueue.main.async { [self] in
                     if let pin = arrayMessage.first, let index = users.firstIndex(of: User(pin: String(pin))) {
-                        if (arrayMessage.count == 2 && arrayMessage[1] == "1") ||  (arrayMessage.count > 2 && arrayMessage[2] == "1") {
+                        var param = arrayMessage[1]
+                        if arrayMessage[2] != "." {
+                            param = arrayMessage[2]
+                        }
+                        if param == "1" {
                             users[index].isMuted = true
                             if let profile = profiles.subviews[index] as? ProfileView {
                                 profile.imageMuted.isHidden = false

+ 1 - 1
NexilisLite/NexilisLite/Source/View/Call/QmeraVideoViewController.swift

@@ -342,7 +342,7 @@ class QmeraVideoViewController: UIViewController {
     
     func addTimerVC() {
         view.addSubview(containerTimerVC)
-        containerTimerVC.anchor(top: view.safeAreaLayoutGuide.topAnchor, centerX: view.centerXAnchor, minWidth: 40)
+        containerTimerVC.anchor(top: view.safeAreaLayoutGuide.topAnchor, centerX: view.centerXAnchor, minHeight: 40, minWidth: 40)
         containerTimerVC.makeRoundedView(radius: 8)
         containerTimerVC.backgroundColor = .black.withAlphaComponent(0.3)
         containerTimerVC.addSubview(labelTimerVC)

+ 28 - 7
NexilisLite/NexilisLite/Source/View/Chat/EditorGroup.swift

@@ -2714,9 +2714,12 @@ extension EditorGroup: UITextViewDelegate, CustomTextViewPasteDelegate {
                 let mentionText = words[lastWordIndex]
                 let lastChar = fulltextForMention.last
                 if lastChar != "\n" && lastChar != " " {
-                    if mentionText.starts(with: "@") || (mentionText.count >= 2 && (self.textFieldSend.textColor != UIColor.lightGray || heightTableEditMention != nil)) {
+                    if mentionText.starts(with: "@") || (mentionText.count >= 2 && (self.textFieldSend.textColor != UIColor.lightGray || heightTableEditMention != nil) && extractFromAtIfSymbolsBefore(String(mentionText)) == nil) {
                         showMention(text: mentionText.starts(with: "@") ? String(mentionText.dropFirst()) : String(mentionText))
                         isShowMention = true
+                    } else if let textM = extractFromAtIfSymbolsBefore(String(mentionText)) {
+                        showMention(text: String(textM.dropFirst()))
+                        isShowMention = true
                     }
                 }
             }
@@ -2803,6 +2806,21 @@ extension EditorGroup: UITextViewDelegate, CustomTextViewPasteDelegate {
         }
     }
     
+    func extractFromAtIfSymbolsBefore(_ text: String) -> String? {
+        guard let atIndex = text.firstIndex(of: "@") else {
+            return nil
+        }
+        
+        let beforeAt = text[..<atIndex]
+        let afterAt = text[atIndex...]
+
+        // Define symbols as anything that's not a letter or digit
+        let symbolSet = CharacterSet.letters.union(.decimalDigits).inverted
+        let isAllSymbols = beforeAt.unicodeScalars.allSatisfy { symbolSet.contains($0) }
+
+        return isAllSymbols ? String(afterAt) : nil
+    }
+    
     public func textViewDidChange(_ textView: UITextView) {
         if textView.text.count == 0 {
             isAlwaysHideLinkPreview = false
@@ -3770,7 +3788,7 @@ extension EditorGroup: UIContextMenuInteractionDelegate {
             } else if dataMessages[indexPath!.row]["attachment_flag"]  as? String ?? "" == "11" {
                 children = [reply, pin, delete]
             }
-            if (Nexilis.checkingAccess(key: "secure_folder_forward") && dataMessages[indexPath!.row]["attachment_flag"]  as? String ?? "" != "11") || (!(dataMessages[indexPath!.row][TypeDataMessage.message_text]  as? String ?? "").isEmpty && (dataMessages[indexPath!.row]["image_id"]  as? String ?? "").isEmpty && (dataMessages[indexPath!.row]["video_id"]  as? String ?? "").isEmpty && (dataMessages[indexPath!.row]["file_id"]  as? String ?? "").isEmpty && (dataMessages[indexPath!.row]["audio_id"]  as? String ?? "").isEmpty && dataMessages[indexPath!.row]["read_receipts"] as? String != "8") || (dataMessages[indexPath!.row][TypeDataMessage.spec_file] as? String ?? "").contains("forward") {
+            if ((Nexilis.checkingAccess(key: "secure_folder_forward") && dataMessages[indexPath!.row]["attachment_flag"] as? String ?? "" != "11") || (!(dataMessages[indexPath!.row][TypeDataMessage.message_text]  as? String ?? "").isEmpty && (dataMessages[indexPath!.row]["image_id"]  as? String ?? "").isEmpty && (dataMessages[indexPath!.row]["video_id"]  as? String ?? "").isEmpty && (dataMessages[indexPath!.row]["file_id"]  as? String ?? "").isEmpty && (dataMessages[indexPath!.row]["audio_id"]  as? String ?? "").isEmpty) || (dataMessages[indexPath!.row][TypeDataMessage.spec_file] as? String ?? "").contains("forward")) && dataMessages[indexPath!.row]["read_receipts"] as? String != "8" {
                 children.insert(forward, at: 2)
             }
             if dataMessages[indexPath!.row]["f_pin"] as? String ?? "" != "-999" && dataMessages[indexPath!.row]["f_pin"] as? String != User.getMyPin() && dataMessages[indexPath!.row]["attachment_flag"]  as? String ?? "" != "11" {
@@ -3818,7 +3836,7 @@ extension EditorGroup: UIContextMenuInteractionDelegate {
             jaData.append(jsonObject)
             if let jsonData = try? JSONSerialization.data(withJSONObject: jaData, options: []),
                let jsonString = String(data: jsonData, encoding: .utf8) {
-                if let response = Nexilis.writeAndWait(message: CoreMessage_TMessageBank.getPinMessage(f_pin: User.getMyPin() ?? "", data: jsonString, oppositePin: self.unique_l_pin, chatId: self.dataTopic["chat_id"] as? String ?? "", scopeId: MessageScope.GROUP)) {
+                if let response = Nexilis.writeAndWait(message: CoreMessage_TMessageBank.getPinMessage(f_pin: User.getMyPin() ?? "", data: jsonString, oppositePin: self.dataGroup["group_id"]  as? String ?? "", chatId: self.dataTopic["chat_id"] as? String ?? "", scopeId: MessageScope.GROUP)) {
                     if response.isOk() {
                         if isPinned {
                             let mId = Nexilis.saveMessageNotif(textMessage: "You".localized() + " " + "pinned a message".localized(), fPin: User.getMyPin() ?? "", lPin: self.unique_l_pin, chatId: self.dataTopic["chat_id"] as? String ?? "", scopeId: MessageScope.GROUP)
@@ -4417,7 +4435,7 @@ extension EditorGroup: UIContextMenuInteractionDelegate {
             contactChatNav.view.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
             if let controller = contactChatNav.viewControllers.first as? ContactChatViewController {
                 controller.isChooser = { [weak self] scope, pin in
-                    if scope == "3" {
+                    if scope == MessageScope.WHISPER || scope == MessageScope.CALL || scope == MessageScope.MISSED_CALL {
                         let editorPersonalVC = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "editorPersonalVC") as! EditorPersonal
                         editorPersonalVC.unique_l_pin = pin
                         editorPersonalVC.dataMessageForward = dataMessages
@@ -4879,7 +4897,10 @@ extension EditorGroup: UITableViewDelegate, UITableViewDataSource, AVAudioPlayer
             if let lastLineIndex = lines.lastIndex(where: { !$0.isEmpty }) {
                 let words = lines[lastLineIndex].split(separator: " ")
                 if let lastWordIndex = words.lastIndex(where: { !$0.isEmpty }) {
-                    let lastWord = words[lastWordIndex]
+                    var lastWord = words[lastWordIndex]
+                    if let textM = extractFromAtIfSymbolsBefore(String(lastWord)) {
+                        lastWord = textM[textM.startIndex..<textM.endIndex]
+                    }
                     if let rangeLastWord = fulltextForMention.range(of: lastWord, options: .backwards) {
                         listMentionInTextField.append(listMentionWithText[indexPath.row])
                         
@@ -5393,7 +5414,7 @@ extension EditorGroup: UITableViewDelegate, UITableViewDataSource, AVAudioPlayer
             imagePinView.tintColor = .lightGray
         }
         
-        if dataMessages[indexPath.row]["read_receipts"] as? String == "8"  && (dataMessages[indexPath.row]["lock"] as? String) != "2" && (dataMessages[indexPath.row]["lock"] as? String) != "1" {
+        if dataMessages[indexPath.row]["read_receipts"] as? String == "8" && (dataMessages[indexPath.row]["lock"] as? String) != "2" && (dataMessages[indexPath.row]["lock"] as? String) != "1" {
             var imageAck = UIImage(named: "ack_icon_gray", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withRenderingMode(.alwaysOriginal)
             cellMessage.contentView.addSubview(imageAckView)
             imageAckView.translatesAutoresizingMaskIntoConstraints = false
@@ -6621,7 +6642,7 @@ extension EditorGroup: UITableViewDelegate, UITableViewDataSource, AVAudioPlayer
             var addTopMargin = true
             if !reffChat.isEmpty && dataMessages[indexPath.row]["message_scope_id"]  as? String ?? "" != MessageScope.FORM {
                 let data = queryMessageReply(message_id: reffChat)
-                if data.count != 0 {
+                if data.count != 0 && topMarginText.constant == 15.0 {
                     addTopMargin = false
                 }
             }

+ 3 - 3
NexilisLite/NexilisLite/Source/View/Chat/EditorPersonal.swift

@@ -4927,7 +4927,7 @@ extension EditorPersonal: UIContextMenuInteractionDelegate {
             } else if dataMessages[indexPath!.row]["attachment_flag"]  as? String ?? "" == "11" {
                children = [reply, delete]
             }
-            if (Nexilis.checkingAccess(key: "secure_folder_forward") && dataMessages[indexPath!.row]["attachment_flag"]  as? String ?? "" != "11") || (!(dataMessages[indexPath!.row][TypeDataMessage.message_text]  as? String ?? "").isEmpty && (dataMessages[indexPath!.row]["image_id"]  as? String ?? "").isEmpty && (dataMessages[indexPath!.row]["video_id"]  as? String ?? "").isEmpty && (dataMessages[indexPath!.row]["file_id"]  as? String ?? "").isEmpty && (dataMessages[indexPath!.row]["audio_id"]  as? String ?? "").isEmpty && dataMessages[indexPath!.row]["read_receipts"] as? String != "8") || (dataMessages[indexPath!.row][TypeDataMessage.spec_file] as? String ?? "").contains("forward") {
+            if ((Nexilis.checkingAccess(key: "secure_folder_forward") && dataMessages[indexPath!.row]["attachment_flag"] as? String ?? "" != "11") || (!(dataMessages[indexPath!.row][TypeDataMessage.message_text]  as? String ?? "").isEmpty && (dataMessages[indexPath!.row]["image_id"]  as? String ?? "").isEmpty && (dataMessages[indexPath!.row]["video_id"]  as? String ?? "").isEmpty && (dataMessages[indexPath!.row]["file_id"]  as? String ?? "").isEmpty && (dataMessages[indexPath!.row]["audio_id"]  as? String ?? "").isEmpty) || (dataMessages[indexPath!.row][TypeDataMessage.spec_file] as? String ?? "").contains("forward")) && dataMessages[indexPath!.row]["read_receipts"] as? String != "8" {
                 children.insert(forward, at: 2)
             }
             if (dataMessages[indexPath!.row]["f_pin"]  as? String ?? "") == idMe {
@@ -5412,7 +5412,7 @@ extension EditorPersonal: UIContextMenuInteractionDelegate {
             contactChatNav.view.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
             if let controller = contactChatNav.viewControllers.first as? ContactChatViewController {
                 controller.isChooser = { [weak self] scope, pin in
-                    if scope == MessageScope.WHISPER {
+                    if scope == MessageScope.WHISPER || scope == MessageScope.CALL || scope == MessageScope.MISSED_CALL {
                         let editorPersonalVC = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "editorPersonalVC") as! EditorPersonal
                         editorPersonalVC.unique_l_pin = pin
                         editorPersonalVC.dataMessageForward = dataMessages
@@ -7952,7 +7952,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource, AVAudioPla
             var addTopMargin = true
             if !reffChat.isEmpty && dataMessages[indexPath.row]["message_scope_id"]  as? String ?? "" != MessageScope.FORM {
                 let data = queryMessageReply(message_id: reffChat)
-                if data.count != 0 {
+                if data.count != 0 && topMarginText.constant == 15.0 {
                     addTopMargin = false
                 }
             }

+ 40 - 13
NexilisLite/NexilisLite/Source/View/Control/BackupRestoreView.swift

@@ -501,13 +501,19 @@ public class BackupRestoreView: UIViewController, UITableViewDataSource, UITable
     private func restoreUcList(dataUcList: [String]) {
         Database.shared.database?.inTransaction({ (fmdb, rollback) in
             do {
-                _ = try Database.shared.insertRecord(fmdb: fmdb, table: "MESSAGE_SUMMARY", cvalues: [
-                    "l_pin" : dataUcList[0],
-                    "message_id" : dataUcList[1],
-                    "counter" : 0,
-                    "pinned" : 0,
-                    "archived" : 0
-                ], replace: true)
+                var lastMessageId = ""
+                if let cursor = Database.shared.getRecords(fmdb: fmdb, query: "select message_id from MESSAGE_SUMMARY where l_pin = '\(dataUcList[0])'"), cursor.next() {
+                    lastMessageId = cursor.string(forColumnIndex: 0) ?? ""
+                }
+                if lastMessageId.isEmpty {
+                    _ = try Database.shared.insertRecord(fmdb: fmdb, table: "MESSAGE_SUMMARY", cvalues: [
+                        "l_pin" : dataUcList[0],
+                        "message_id" : dataUcList[1],
+                        "counter" : 0,
+                        "pinned" : 0,
+                        "archived" : 0
+                    ], replace: true)
+                }
                 recordSizeRestore += 1
             } catch {
                 rollback.pointee = true
@@ -617,7 +623,11 @@ public class BackupRestoreView: UIViewController, UITableViewDataSource, UITable
                         let dataMessage = valueText[i].components(separatedBy: separator)
                         restoreMessage(nameColumn: nameColumn, message: dataMessage)
                         DispatchQueue.main.async { [self] in
-                            labelRestoring.text = "Restoring...".localized() + "  \(percent)"
+                            var text = "Restoring...".localized() + "  \(percent)"
+                            if percent.replacingOccurrences(of: " ", with: " ") == "100,0 %" {
+                                text = "Finalizing data restore...".localized()
+                            }
+                            labelRestoring.text = text
                         }
                     }
                 } else if nameFile.trimmingCharacters(in: .whitespacesAndNewlines) == "UC_LIST" {
@@ -626,7 +636,11 @@ public class BackupRestoreView: UIViewController, UITableViewDataSource, UITable
                         let dataUcList = valueText[i].components(separatedBy: separator)
                         restoreUcList(dataUcList: dataUcList)
                         DispatchQueue.main.async { [self] in
-                            labelRestoring.text = "Restoring...".localized() + "  \(percent)"
+                            var text = "Restoring...".localized() + "  \(percent)"
+                            if percent.replacingOccurrences(of: " ", with: " ") == "100,0 %" {
+                                text = "Finalizing data restore...".localized()
+                            }
+                            labelRestoring.text = text
                         }
                     }
                 } else if nameFile.trimmingCharacters(in: .whitespacesAndNewlines) == "FORM_DATA" {
@@ -636,7 +650,11 @@ public class BackupRestoreView: UIViewController, UITableViewDataSource, UITable
                         let dataFormData = valueText[i].components(separatedBy: separator)
                         restoreFormData(nameColumn: nameColumn, data: dataFormData)
                         DispatchQueue.main.async { [self] in
-                            labelRestoring.text = "Restoring...".localized() + "  \(percent)"
+                            var text = "Restoring...".localized() + "  \(percent)"
+                            if percent.replacingOccurrences(of: " ", with: " ") == "100,0 %" {
+                                text = "Finalizing data restore...".localized()
+                            }
+                            labelRestoring.text = text
                         }
                     }
                 } else if nameFile.trimmingCharacters(in: .whitespacesAndNewlines) == "TASK_PIC" {
@@ -646,7 +664,11 @@ public class BackupRestoreView: UIViewController, UITableViewDataSource, UITable
                         let dataTaskPIC = valueText[i].components(separatedBy: separator)
                         restoreTaskPIC(nameColumn: nameColumn, data: dataTaskPIC)
                         DispatchQueue.main.async { [self] in
-                            labelRestoring.text = "Restoring...".localized() + "  \(percent)"
+                            var text = "Restoring...".localized() + "  \(percent)"
+                            if percent.replacingOccurrences(of: " ", with: " ") == "100,0 %" {
+                                text = "Finalizing data restore...".localized()
+                            }
+                            labelRestoring.text = text
                         }
                     }
                 }
@@ -657,7 +679,11 @@ public class BackupRestoreView: UIViewController, UITableViewDataSource, UITable
                         let dataTaskDetail = valueText[i].components(separatedBy: separator)
                         restoreTaskDetail(nameColumn: nameColumn, data: dataTaskDetail)
                         DispatchQueue.main.async { [self] in
-                            labelRestoring.text = "Restoring...".localized() + "  \(percent)"
+                            var text = "Restoring...".localized() + "  \(percent)"
+                            if percent.replacingOccurrences(of: " ", with: " ") == "100,0 %" {
+                                text = "Finalizing data restore...".localized()
+                            }
+                            labelRestoring.text = text
                         }
                     }
                 }
@@ -1012,7 +1038,8 @@ public class BackupRestoreView: UIViewController, UITableViewDataSource, UITable
 func formatPercentage(numerator: Int64, denominator: Int64) -> String {
     guard denominator != 0 else { return "NaN" }
 
-    let value = Double(numerator) / Double(denominator)
+    var value = Double(numerator) / Double(denominator)
+    value = min(value, 1.0)
 
     let formatter = NumberFormatter()
     formatter.numberStyle = .percent

+ 20 - 18
NexilisLite/NexilisLite/Source/View/Control/ContactChatViewController.swift

@@ -1586,26 +1586,28 @@ extension ContactChatViewController {
                                     stringMessage.append(NSAttributedString(string: "You".localized() + ": ", attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 12 + String.offset(), weight: .medium)]))
                                 }
                                 stringMessage.append(("🚫 _"+"You were deleted this message".localized()+"_").richText())
-                            } else if data.messageScope != MessageScope.CALL && data.messageScope != MessageScope.MISSED_CALL && !data.messageId.contains("NTFPIN_") {
+                            } else {
                                 let imageStatus = NSTextAttachment()
-                                let status = getRealStatus(messageId: data.messageId)
-                                if status == "0" {
-                                    imageStatus.image = UIImage(systemName: "xmark.circle")!.withTintColor(UIColor.red, renderingMode: .alwaysOriginal)
-                                } else if status == "1" {
-                                    imageStatus.image = UIImage(systemName: "clock.arrow.circlepath")!.withTintColor(UIColor.lightGray, renderingMode: .alwaysOriginal)
-                                } else if status == "2" {
-                                    imageStatus.image = UIImage(named: "checklist", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withTintColor(UIColor.lightGray)
-                                } else if (status == "3") {
-                                    imageStatus.image = UIImage(named: "double-checklist", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withTintColor(UIColor.lightGray)
-                                } else if (status == "8") {
-                                    imageStatus.image = UIImage(named: "message_status_ack", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withRenderingMode(.alwaysOriginal)
-                                } else {
-                                    imageStatus.image = UIImage(named: "double-checklist", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withTintColor(UIColor.systemBlue)
+                                if data.messageScope != MessageScope.CALL && data.messageScope != MessageScope.MISSED_CALL && !data.messageId.contains("NTFPIN_") {
+                                    let status = getRealStatus(messageId: data.messageId)
+                                    if status == "0" {
+                                        imageStatus.image = UIImage(systemName: "xmark.circle")!.withTintColor(UIColor.red, renderingMode: .alwaysOriginal)
+                                    } else if status == "1" {
+                                        imageStatus.image = UIImage(systemName: "clock.arrow.circlepath")!.withTintColor(UIColor.lightGray, renderingMode: .alwaysOriginal)
+                                    } else if status == "2" {
+                                        imageStatus.image = UIImage(named: "checklist", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withTintColor(UIColor.lightGray)
+                                    } else if (status == "3") {
+                                        imageStatus.image = UIImage(named: "double-checklist", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withTintColor(UIColor.lightGray)
+                                    } else if (status == "8") {
+                                        imageStatus.image = UIImage(named: "message_status_ack", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withRenderingMode(.alwaysOriginal)
+                                    } else {
+                                        imageStatus.image = UIImage(named: "double-checklist", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withTintColor(UIColor.systemBlue)
+                                    }
+                                    imageStatus.bounds = CGRect(x: 0, y: -5, width: 15, height: 15)
+                                    let imageStatusString = NSAttributedString(attachment: imageStatus)
+                                    stringMessage.append(imageStatusString)
+                                    stringMessage.append(NSAttributedString(string: " "))
                                 }
-                                imageStatus.bounds = CGRect(x: 0, y: -5, width: 15, height: 15)
-                                let imageStatusString = NSAttributedString(attachment: imageStatus)
-                                stringMessage.append(imageStatusString)
-                                stringMessage.append(NSAttributedString(string: " "))
                                 if data.messageScope == "4" {
                                     stringMessage.append(NSAttributedString(string: "You".localized() + ": ", attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 12 + String.offset(), weight: .medium)]))
                                 }