diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index cb6f6cf044..0392ab7c45 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -1152,6 +1152,15 @@ "MuteFor.Days_many" = "Mute for %@ days"; "MuteFor.Days_0" = "Mute for %@ days"; +"MutedForTime.Minutes_1" = "1 minute"; +"MutedForTime.Minutes_any" = "%@ minutes"; + +"MutedForTime.Hours_1" = "1 hour"; +"MutedForTime.Hours_any" = "%@ hours"; + +"MutedForTime.Days_1" = "1 day"; +"MutedForTime.Days_any" = "%@ days"; + "MuteExpires.Minutes_1" = "in 1 minute"; "MuteExpires.Minutes_2" = "in 2 minutes"; "MuteExpires.Minutes_3_10" = "in %@ minutes"; @@ -7469,3 +7478,10 @@ Sorry for the inconvenience."; "PeerInfo.ClearMessages" = "Clear Messages"; "PeerInfo.ClearConfirmationUser" = "Are you sure you want to delete all messages with %@?"; "PeerInfo.ClearConfirmationGroup" = "Are you sure you want to delete all messages in %@?"; + +"PeerInfo.TooltipSoundEnabled" = "You will receive notifications with sound."; +"PeerInfo.TooltipSoundDisabled" = "You will receive silent notifications."; +"PeerInfo.TooltipUnmuted" = "Notifications are unmuted."; +"PeerInfo.TooltipMutedFor" = "Notifications are muted for %@."; +"PeerInfo.TooltipMutedUntil" = "Notifications are muted until %@."; +"PeerInfo.TooltipMutedForever" = "Notifications are muted."; diff --git a/build-system/Make/Make.py b/build-system/Make/Make.py index 7de3beb456..1bdb56fa31 100644 --- a/build-system/Make/Make.py +++ b/build-system/Make/Make.py @@ -44,7 +44,7 @@ class BazelCommandLine: # repository), but disabling it also causes a noticeable build time regression # so it can be explicitly re-enabled by users who are not affected by those # crashes. - '--features=swift.use_global_module_cache', + #'--features=swift.use_global_module_cache', # https://docs.bazel.build/versions/master/command-line-reference.html # Print the subcommand details in case of failure. diff --git a/submodules/Display/Source/ViewController.swift b/submodules/Display/Source/ViewController.swift index d4e11392e8..f7780a6e2e 100644 --- a/submodules/Display/Source/ViewController.swift +++ b/submodules/Display/Source/ViewController.swift @@ -554,7 +554,7 @@ public protocol CustomViewControllerNavigationDataSummary: AnyObject { (self.navigationController as? NavigationController)?.pushViewController(controller) } - public func present(_ controller: ViewController, in context: PresentationContextType, with arguments: Any? = nil, blockInteraction: Bool = false, completion: @escaping () -> Void = {}) { + open func present(_ controller: ViewController, in context: PresentationContextType, with arguments: Any? = nil, blockInteraction: Bool = false, completion: @escaping () -> Void = {}) { if !(controller is StandalonePresentableController), case .window = context, let arguments = arguments as? ViewControllerPresentationArguments, case .modalSheet = arguments.presentationAnimation, self.navigationController != nil { controller.navigationPresentation = .modal self.push(controller) diff --git a/submodules/TelegramPresentationData/Sources/NumericFormat.swift b/submodules/TelegramPresentationData/Sources/NumericFormat.swift index 9ffc35486f..395061337b 100644 --- a/submodules/TelegramPresentationData/Sources/NumericFormat.swift +++ b/submodules/TelegramPresentationData/Sources/NumericFormat.swift @@ -146,6 +146,16 @@ public func muteForIntervalString(strings: PresentationStrings, value: Int32) -> } } +public func mutedForTimeIntervalString(strings: PresentationStrings, value: Int32) -> String { + if value < 60 * 60 { + return strings.MutedForTime_Minutes(max(1, value / (60))) + } else if value < 60 * 60 * 24 { + return strings.MutedForTime_Hours(max(1, value / (60 * 60))) + } else { + return strings.MutedForTime_Days(max(1, value / (60 * 60 * 24))) + } +} + public func unmuteIntervalString(strings: PresentationStrings, value: Int32) -> String { if value < 60 * 60 { return strings.MuteExpires_Minutes(max(1, value / 60)) diff --git a/submodules/TelegramUI/Resources/Animations/anim_mute_for.json b/submodules/TelegramUI/Resources/Animations/anim_mute_for.json new file mode 100644 index 0000000000..1ec4f52fdb --- /dev/null +++ b/submodules/TelegramUI/Resources/Animations/anim_mute_for.json @@ -0,0 +1 @@ +{"v":"4.8.0","meta":{"g":"LottieFiles AE ","a":"","k":"","d":"","tc":""},"fr":60,"ip":0,"op":61,"w":512,"h":512,"nm":"Mute for","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"NULL ALL","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.3,"y":1},"o":{"x":0.05,"y":0},"t":0,"s":[256,404,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.6,"y":1},"o":{"x":0.3,"y":0},"t":12,"s":[256,218,0],"to":[0,0,0],"ti":[0,0,0]},{"t":24,"s":[256,256,0]}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.2,0.2,0.2],"y":[1,1,1]},"o":{"x":[0.05,0.05,0.05],"y":[0,0,0]},"t":0,"s":[0,0,100]},{"i":{"x":[0.7,0.7,0.7],"y":[1,1,1]},"o":{"x":[0.3,0.3,0.3],"y":[0,0,0]},"t":16,"s":[103,103,100]},{"i":{"x":[0.7,0.7,0.7],"y":[1,1,1]},"o":{"x":[0.3,0.3,0.3],"y":[0,0,0]},"t":29,"s":[96,96,100]},{"i":{"x":[0.7,0.7,0.7],"y":[1,1,1]},"o":{"x":[0.3,0.3,0.3],"y":[0,0,0]},"t":40,"s":[102,102,100]},{"i":{"x":[0.4,0.4,0.4],"y":[1,1,1]},"o":{"x":[0.3,0.3,0.3],"y":[0,0,0]},"t":51,"s":[99,99,100]},{"t":60,"s":[100,100,100]}],"ix":6}},"ao":0,"ip":1,"op":180,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Z","parent":3,"sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":28,"s":[100]},{"t":35,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[-18.201,18.449,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":26,"s":[128.01,-129.801,0],"to":[0,0,0],"ti":[0,0,0]},{"t":35,"s":[166.212,-157.57,0]}],"ix":2},"a":{"a":0,"k":[135.35,-152.7,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":0,"s":[137,137,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":17,"s":[100,100,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":26,"s":[85,85,100]},{"t":35,"s":[40,40,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,-9.2],[1.8,-2.7],[0,0],[0,0],[0,-9.3],[7.5,0],[0,0],[2.9,2.3],[-4.9,7.2],[0,0],[0,0],[0,7.6],[-7,0.5]],"o":[[9.2,0],[0,3.3],[0,0],[0,0],[7.1,0],[0,9],[0,0],[-3.7,0],[-7,-5.4],[0,0],[0,0],[-7.1,0],[0,-7.6],[0,0]],"v":[[158.6,-205],[175.3,-188.3],[172.5,-179.1],[132.7,-127.3],[165.2,-127.3],[178.6,-114.1],[166.1,-100.4],[112.1,-100.4],[101.9,-103.9],[98.2,-126.4],[137.9,-178.1],[105.5,-178.1],[92.1,-191.5],[104.6,-204.9]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":26,"op":180,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Body","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.7],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":0,"s":[15]},{"i":{"x":[0.7],"y":[1]},"o":{"x":[0.3],"y":[0]},"t":13,"s":[-10]},{"i":{"x":[0.7],"y":[1]},"o":{"x":[0.3],"y":[0]},"t":26,"s":[7]},{"i":{"x":[0.7],"y":[1]},"o":{"x":[0.3],"y":[0]},"t":37,"s":[-3]},{"i":{"x":[0.4],"y":[1]},"o":{"x":[0.3],"y":[0]},"t":48,"s":[1]},{"t":60,"s":[0]}],"ix":10},"p":{"a":0,"k":[-21.031,-93.65,0],"ix":2},"a":{"a":0,"k":[-21.031,-93.65,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.4,"y":1},"o":{"x":0.2,"y":0},"t":34,"s":[{"i":[[0,0],[0.012,-0.589],[0.466,-0.029],[0,0],[0.183,0.136],[-0.348,0.53],[0,0],[0,0],[0,0.613],[-0.466,0.029],[0,0],[0,-0.666],[0.124,-0.189],[0,0]],"o":[[0.466,0.029],[-0.012,0.583],[0,0],[-0.23,-0.018],[-0.519,-0.383],[0,0],[0,0],[-0.466,-0.029],[0,-0.607],[0,0],[0.666,0],[0,0.23],[0,0],[0,0]],"v":[[-60.566,62.774],[-59.7,63.699],[-60.566,64.625],[-64.797,64.625],[-65.428,64.395],[-65.723,62.768],[-62.169,57.941],[-65.328,57.941],[-66.194,57.016],[-65.328,56.091],[-60.896,56.091],[-59.688,57.299],[-59.876,57.941],[-63.442,62.78]],"c":true}]},{"t":60,"s":[{"i":[[0,0],[0.2,-10],[7.9,-0.5],[0,0],[3.1,2.3],[-5.9,9],[0,0],[0,0],[0,10.4],[-7.9,0.5],[0,0],[0,-11.3],[2.1,-3.2],[0,0]],"o":[[7.9,0.5],[-0.2,9.9],[0,0],[-3.9,-0.3],[-8.8,-6.5],[0,0],[0,0],[-7.9,-0.5],[0,-10.3],[0,0],[11.3,0],[0,3.9],[0,0],[0,0]],"v":[[20.9,58.7],[35.6,74.4],[20.9,90.1],[-50.9,90.1],[-61.6,86.2],[-66.6,58.6],[-6.3,-23.3],[-59.9,-23.3],[-74.6,-39],[-59.9,-54.7],[15.3,-54.7],[35.8,-34.2],[32.6,-23.3],[-27.9,58.8]],"c":true}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tr","p":{"a":0,"k":[-19.4,17.7],"ix":2},"a":{"a":0,"k":[-19.4,17.7],"ix":1},"s":{"a":1,"k":[{"t":20,"s":[0,0],"h":1},{"t":34,"s":[100,100],"h":1}],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":1,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.6,"y":1},"o":{"x":0.167,"y":0.167},"t":14,"s":[{"i":[[0,0],[0.034,-1.69],[1.335,-0.084],[0,0],[0.525,0.388],[-0.997,1.521],[0,0],[0,0],[0,1.757],[-1.335,0.084],[0,0],[0,-1.909],[0.355,-0.541],[0,0]],"o":[[1.335,0.084],[-0.034,1.673],[0,0],[-0.659,-0.051],[-1.487,-1.098],[0,0],[0,0],[-1.335,-0.084],[0,-1.74],[0,0],[1.909,0],[0,0.659],[0,0],[0,0]],"v":[[-12.59,24.628],[-10.107,27.281],[-12.59,29.934],[-24.723,29.934],[-26.531,29.275],[-27.376,24.611],[-17.187,10.772],[-26.244,10.772],[-28.728,8.119],[-26.244,5.466],[-13.537,5.466],[-10.073,8.93],[-10.613,10.772],[-20.836,24.645]],"c":true}]},{"i":{"x":0.4,"y":1},"o":{"x":0.167,"y":0.167},"t":33,"s":[{"i":[[0,0],[0.2,-10],[7.9,-0.5],[0,0],[3.1,2.3],[-5.9,9],[0,0],[0,0],[0,10.4],[-7.9,0.5],[0,0],[0,-11.3],[2.1,-3.2],[0,0]],"o":[[7.9,0.5],[-0.2,9.9],[0,0],[-3.9,-0.3],[-8.8,-6.5],[0,0],[0,0],[-7.9,-0.5],[0,-10.3],[0,0],[11.3,0],[0,3.9],[0,0],[0,0]],"v":[[20.9,58.7],[35.6,74.4],[20.9,90.1],[-50.9,90.1],[-61.6,86.2],[-66.6,58.6],[-6.3,-23.3],[-59.9,-23.3],[-74.6,-39],[-59.9,-54.7],[15.3,-54.7],[35.8,-34.2],[32.6,-23.3],[-27.9,58.8]],"c":true}]},{"t":60,"s":[{"i":[[0,0],[0.15,-6.923],[8.798,0.25],[0,0],[2.302,1.588],[-4.375,6.231],[0,0],[0,0],[0.107,8.63],[-5.857,0.346],[0,0],[0,-7.823],[1.557,-2.215],[0,0]],"o":[[5.857,0.346],[-0.148,6.854],[0,0],[-2.892,-0.208],[-6.525,-4.5],[0,0],[0,0],[-5.857,-0.346],[-0.116,-9.391],[0,0],[8.378,0],[0,2.7],[0,0],[0,0]],"v":[[16.202,42.011],[26.602,54.13],[14.702,67.5],[-40.784,67],[-48.718,64.3],[-52.675,43.191],[-12.215,-9.511],[-45.207,-10.011],[-57.607,-22.88],[-45.957,-36],[9.8,-35.75],[25.25,-19.557],[22.877,-12.011],[-17.231,41.58]],"c":true}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tr","p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":13,"s":[-66.124,69.677],"to":[0,0],"ti":[0,0]},{"i":{"x":0.6,"y":1},"o":{"x":0.167,"y":0.167},"t":26,"s":[-1.656,3.622],"to":[0,0],"ti":[0,0]},{"t":60,"s":[131.6,-150.3]}],"ix":2},"a":{"a":0,"k":[-19.4,17.7],"ix":1},"s":{"a":1,"k":[{"t":1,"s":[0,0],"h":1},{"t":14,"s":[100,100],"h":1}],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":1,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[{"i":[[0,0],[0.2,-10],[7.9,-0.5],[0,0],[3.1,2.3],[-5.9,9],[0,0],[0,0],[0,10.4],[-7.9,0.5],[0,0],[0,-11.3],[2.1,-3.2],[0,0]],"o":[[7.9,0.5],[-0.2,9.9],[0,0],[-3.9,-0.3],[-8.8,-6.5],[0,0],[0,0],[-7.9,-0.5],[0,-10.3],[0,0],[11.3,0],[0,3.9],[0,0],[0,0]],"v":[[20.9,58.7],[35.6,74.4],[20.9,90.1],[-50.9,90.1],[-61.6,86.2],[-66.6,58.6],[-6.3,-23.3],[-59.9,-23.3],[-74.6,-39],[-59.9,-54.7],[15.3,-54.7],[35.8,-34.2],[32.6,-23.3],[-27.9,58.8]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":16,"s":[{"i":[[0,0],[0.148,-7.096],[5.801,-0.355],[0,0],[2.28,1.627],[-4.333,6.386],[0,0],[0,0],[0,7.38],[-5.801,0.355],[0,0],[0,-8.018],[1.542,-2.271],[0,0]],"o":[[5.801,0.355],[-0.147,7.025],[0,0],[-2.864,-0.213],[-6.462,-4.612],[0,0],[0,0],[-5.801,-0.355],[0,-7.309],[0,0],[8.298,0],[0,2.767],[0,0],[0,0]],"v":[[9.195,44.886],[19.437,57.181],[9,69.117],[-45.657,69.952],[-53.515,67.185],[-57.116,45.08],[-15.421,-10.242],[-52.369,-9.827],[-63.183,-22.112],[-52.176,-34.172],[3.034,-34.859],[18.1,-19.626],[15.75,-11.891],[-26.291,45.294]],"c":true}]},{"t":25,"s":[{"i":[[0,0],[0.125,-5.911],[6.158,0.167],[0,0],[1.924,1.355],[-3.657,5.32],[0,0],[0,0],[0,6.147],[-4.897,0.296],[0,0],[0,-6.679],[1.302,-1.892],[0,0]],"o":[[4.897,0.296],[-0.124,5.852],[0,0],[-2.418,-0.177],[-5.455,-3.842],[0,0],[0,0],[-4.897,-0.296],[0,-6.088],[0,0],[7.005,0],[0,2.305],[0,0],[0,0]],"v":[[4.126,39.89],[13.642,51.059],[4.008,62.091],[-44.717,61.966],[-51.35,59.661],[-54.367,40.413],[-20.426,-3.835],[-49.379,-3.843],[-58.889,-14.427],[-49.961,-25.495],[-0.549,-25.64],[12.327,-12.359],[10.344,-5.916],[-24.855,40.148]],"c":true}]}],"ix":2},"nm":"Path 3","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tr","p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[-19.4,17.7],"to":[0,0],"ti":[0,0]},{"t":26,"s":[131.763,-130.207]}],"ix":2},"a":{"a":0,"k":[-19.4,17.7],"ix":1},"s":{"a":1,"k":[{"t":17,"s":[100,100],"h":1},{"t":26,"s":[0,0],"h":1}],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":1,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[12.7,12.4],[0,0],[0,2.5],[0,0],[57.3,13.9],[0,0],[15.9,0],[0,-14.1],[0,0],[0,-60],[0,0],[1.7,-1.9],[0,0],[-18,0],[0,0]],"o":[[0,0],[-1.5,-2],[0,0],[-1,-60],[0,0],[0,-14.5],[-14.8,0],[0,0],[-56.3,15.2],[0,0],[-0.2,2.5],[0,0],[-11.8,12.7],[0,0],[17.8,-0.7]],"v":[[130.1,110.1],[105.8,82.8],[103.5,75.9],[103.5,-8.2],[4.7,-128.3],[4.7,-141.5],[-22.1,-167.7],[-48.3,-141.5],[-48.3,-128.4],[-143.6,-5.9],[-143.6,76.9],[-146.5,83.6],[-170.8,110.8],[-151.8,144.4],[112.6,144.4]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":5,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":1,"op":180,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Bottom","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.7,"y":1},"o":{"x":0.514,"y":0},"t":2,"s":[-58.416,164.067,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.7,"y":1},"o":{"x":0.3,"y":0},"t":16,"s":[9.925,165.08,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.7,"y":1},"o":{"x":0.3,"y":0},"t":29,"s":[-38.506,164.725,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.7,"y":1},"o":{"x":0.3,"y":0},"t":40,"s":[-6.869,164.433,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.4,"y":1},"o":{"x":0.3,"y":0},"t":51,"s":[-26.011,164.7,0],"to":[0,0,0],"ti":[0,0,0]},{"t":60,"s":[-20.011,164.7,0]}],"ix":2},"a":{"a":0,"k":[-20.011,164.7,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[22.7,-0.3],[-0.8,19.1]],"o":[[0,20.2],[-21.7,0.2],[0,0]],"v":[[21.2,164.7],[-20,202.8],[-61.2,164.7]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":1,"op":180,"st":0,"bm":0}],"markers":[]} \ No newline at end of file diff --git a/submodules/TelegramUI/Resources/Animations/anim_sound_off.json b/submodules/TelegramUI/Resources/Animations/anim_sound_off.json new file mode 100644 index 0000000000..cca176358f --- /dev/null +++ b/submodules/TelegramUI/Resources/Animations/anim_sound_off.json @@ -0,0 +1 @@ +{"v":"4.8.0","meta":{"g":"LottieFiles AE ","a":"","k":"","d":"","tc":""},"fr":60,"ip":0,"op":61,"w":512,"h":512,"nm":"Sound Off","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"NULL ALL","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.507],"y":[1.085]},"o":{"x":[0.595],"y":[0]},"t":0,"s":[28]},{"i":{"x":[0.95],"y":[1]},"o":{"x":[0.7],"y":[0.283]},"t":14,"s":[-7]},{"i":{"x":[0.7],"y":[1]},"o":{"x":[0.3],"y":[0]},"t":30,"s":[10]},{"i":{"x":[0.7],"y":[1]},"o":{"x":[0.3],"y":[0]},"t":36,"s":[-5]},{"i":{"x":[0.7],"y":[1]},"o":{"x":[0.3],"y":[0]},"t":41,"s":[5]},{"i":{"x":[0.7],"y":[1]},"o":{"x":[0.3],"y":[0]},"t":46,"s":[-3]},{"i":{"x":[0.7],"y":[1]},"o":{"x":[0.3],"y":[0]},"t":52,"s":[1]},{"t":60,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.3,"y":1},"o":{"x":0.4,"y":0},"t":0,"s":[326,365.957,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.8,"y":1},"o":{"x":0.6,"y":0},"t":20,"s":[247.971,230.719,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.6,"y":1},"o":{"x":0.3,"y":0},"t":32,"s":[283.5,285.957,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.6,"y":1},"o":{"x":0.3,"y":0},"t":44,"s":[276,239.957,0],"to":[0,0,0],"ti":[0,0,0]},{"t":60,"s":[276,255.957,0]}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.2,0.2,0.2],"y":[1,1,1]},"o":{"x":[0.1,0.1,0.1],"y":[0,0,0]},"t":0,"s":[20,0,100]},{"i":{"x":[0.95,0.95,0.95],"y":[1,1,1]},"o":{"x":[0.8,0.8,0.8],"y":[0,0,0]},"t":18,"s":[90,104,100]},{"i":{"x":[0.7,0.7,0.7],"y":[1,1,1]},"o":{"x":[0.3,0.3,0.3],"y":[0,0,0]},"t":30,"s":[90,75,100]},{"i":{"x":[0.7,0.7,0.7],"y":[1,1,1]},"o":{"x":[0.3,0.3,0.3],"y":[0,0,0]},"t":37,"s":[105,105,100]},{"i":{"x":[0.7,0.7,0.7],"y":[1,1,1]},"o":{"x":[0.3,0.3,0.3],"y":[0,0,0]},"t":42,"s":[97,97,100]},{"t":48,"s":[100,100,100]}],"ix":6}},"ao":0,"ip":1,"op":180,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Line","parent":4,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[6.25,1.35,0],"ix":2},"a":{"a":0,"k":[6.25,1.35,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.6,"y":1},"o":{"x":0.8,"y":0},"t":19,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-194.619,-190.263],[168.481,158.037]],"c":false}]},{"i":{"x":0.7,"y":1},"o":{"x":0.3,"y":0},"t":32,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-145.787,-140.476],[207.235,196.36]],"c":false}]},{"i":{"x":0.7,"y":1},"o":{"x":0.3,"y":0},"t":37,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-185.469,-181.453],[165.552,155.752]],"c":false}]},{"t":43,"s":[{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-175.3,-172.8],[187.8,175.5]],"c":false}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":34,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.6],"y":[1]},"o":{"x":[0.8],"y":[0]},"t":19,"s":[0]},{"t":30,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.6],"y":[1]},"o":{"x":[0.8],"y":[0]},"t":19,"s":[0]},{"t":30,"s":[3]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":21,"op":180,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Top Top","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[38.282,-48.297,0],"ix":2},"a":{"a":0,"k":[38.282,-48.297,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.3,"y":1},"o":{"x":0.1,"y":0},"t":3,"s":[{"i":[[0,0.1],[0.8,0],[0,0],[0,0],[-6.4,1.5],[0,0]],"o":[[-0.2,-0.9],[0,0],[0,0],[-1.266,-33.912],[0,0],[23.1,-4.8]],"v":[[184.317,-78.65],[182.517,-80.15],[-106.368,-35.177],[-147.331,-33.019],[-115.272,-76.324],[174.017,-120.15]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.3,"y":0},"t":18,"s":[{"i":[[0,0.1],[0.8,0],[0,0],[0,0],[-6.4,1.5],[0,0]],"o":[[-0.2,-0.9],[0,0],[0,0],[-1.266,-33.912],[0,0],[23.1,-4.8]],"v":[[120.8,-149.7],[119,-151.2],[-59.396,-113.953],[-100.359,-111.795],[-68.3,-155.1],[110.5,-191.2]],"c":true}]},{"t":19,"s":[{"i":[[0,0.1],[0.8,0],[0,0],[0,0],[-6.4,1.5],[0,0]],"o":[[-0.2,-0.9],[0,0],[0,0],[-1.266,-33.912],[0,0],[23.1,-4.8]],"v":[[120.8,-149.7],[119,-151.2],[-59.396,-113.953],[-100.359,-111.795],[-68.3,-155.1],[110.5,-191.2]],"c":true}],"h":1},{"t":25,"s":[{"i":[[0,0.1],[0.8,0],[0,0],[0,0],[-6.4,1.5],[0,0]],"o":[[-0.2,-0.9],[0,0],[0,0],[4.8,-4],[0,0],[23.1,-4.8]],"v":[[120.8,-149.7],[119,-151.2],[-54.3,-116.3],[-85.3,-146.7],[-68.3,-155.1],[110.5,-191.2]],"c":true}],"h":1}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":1,"op":180,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Top Bottom","parent":3,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[38.282,-48.297,0],"ix":2},"a":{"a":0,"k":[38.282,-48.297,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.3,"y":1},"o":{"x":0.1,"y":0},"t":3,"s":[{"i":[[-4.3,-19.24],[1.331,-8.002],[12.42,-8.541],[5.324,5.994],[0,0],[0,0.083],[0.8,0],[0,0]],"o":[[1.5,6.552],[-0.957,5.754],[-6.18,-7.561],[26.409,-1.342],[0,0],[-0.2,-0.746],[0,0],[28.171,-4.938]],"v":[[219.954,-90.552],[219.845,104.803],[203.836,131.006],[138.861,57.639],[178.453,62.603],[180.6,-78.452],[178.8,-79.696],[169.299,-118.145]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.3,"y":0},"t":18,"s":[{"i":[[-4.3,-23.2],[1.331,-9.649],[12.42,-10.298],[5.324,7.227],[0,0],[0,0.1],[0.8,0],[0,0]],"o":[[1.5,7.9],[-0.957,6.939],[-6.18,-9.117],[26.409,-1.618],[0,0],[-0.2,-0.9],[0,0],[23.1,-4.8]],"v":[[160.9,-157.8],[162.191,105.885],[146.183,137.481],[81.208,49.015],[120.8,55],[120.8,-149.7],[119,-151.2],[110.5,-191.2]],"c":true}]},{"t":19,"s":[{"i":[[-4.3,-23.2],[1.331,-9.649],[12.42,-10.298],[5.324,7.227],[0,0],[0,0.1],[0.8,0],[0,0]],"o":[[1.5,7.9],[-0.957,6.939],[-6.18,-9.117],[26.409,-1.618],[0,0],[-0.2,-0.9],[0,0],[23.1,-4.8]],"v":[[160.9,-157.8],[162.191,105.885],[146.183,137.481],[81.208,49.015],[120.8,55],[120.8,-149.7],[119,-151.2],[110.5,-191.2]],"c":true}],"h":1},{"t":28,"s":[{"i":[[-4.3,-23.2],[0,0],[0,0],[0,0],[0,0],[0,0.1],[0.8,0],[0,0]],"o":[[1.5,7.9],[0,0],[0,0],[0,0],[0,0],[-0.2,-0.9],[0,0],[23.1,-4.8]],"v":[[160.9,-157.8],[161.7,95.5],[160.755,94.564],[121.112,55.309],[120.8,55],[120.8,-149.7],[119,-151.2],[110.5,-191.2]],"c":true}],"h":1}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":1,"op":180,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Bottom R","parent":4,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[63.15,116.65,0],"ix":2},"a":{"a":0,"k":[63.15,116.65,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.3,"y":1},"o":{"x":0.1,"y":0},"t":3,"s":[{"i":[[-58.795,2.85],[0,0],[7.433,0],[0,26.189]],"o":[[0,0],[-20.002,19.246],[-41.46,0],[0,-8.499]],"v":[[140.985,58.827],[207.76,129.436],[143.556,152.205],[72.886,104.596]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.3,"y":0},"t":18,"s":[{"i":[[-56.158,3.287],[0,0],[7.1,0],[0,30.2]],"o":[[0,0],[-17.583,17.964],[-39.6,0],[0,-9.8]],"v":[[82.619,48.668],[146.381,136.663],[86.7,157.5],[19.2,102.6]],"c":true}]},{"t":19,"s":[{"i":[[-56.158,3.287],[0,0],[7.1,0],[0,30.2]],"o":[[0,0],[-17.583,17.964],[-39.6,0],[0,-9.8]],"v":[[82.619,48.668],[146.381,136.663],[86.7,157.5],[19.2,102.6]],"c":true}],"h":1},{"t":28,"s":[{"i":[[-6,8],[0,0],[7.1,0],[0,30.2]],"o":[[0,0],[-6.5,1.5],[-39.6,0],[0,-9.8]],"v":[[27.7,75.8],[107.1,155.3],[86.7,157.5],[19.2,102.6]],"c":true}],"h":1}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":1,"op":180,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Bottom L","parent":4,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-131.6,73.1,0],"ix":2},"a":{"a":0,"k":[-131.6,73.1,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.3,"y":1},"o":{"x":0.1,"y":0},"t":3,"s":[{"i":[[0,0],[0,0],[0,-1.484],[39.5,0],[0,24.9],[-39.5,0],[-9.2,-2.721]],"o":[[0,0],[0,0],[0,24.818],[-39.5,0],[0,-24.818],[10.9,0],[0,0]],"v":[[-149.241,-39.902],[-107.881,-40.686],[-110.291,145.989],[-181.891,191.007],[-253.491,145.989],[-181.891,100.97],[-151.491,105.258]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.3,"y":0},"t":18,"s":[{"i":[[0,0],[0,0],[0,-1.8],[39.5,0],[0,30.2],[-39.5,0],[-9.2,-3.3]],"o":[[0,0],[0,0],[0,30.1],[-39.5,0],[0,-30.1],[10.9,0],[0,0]],"v":[[-100.461,-113.925],[-59.1,-114.876],[-60,137],[-131.6,191.599],[-203.2,137],[-131.6,82.4],[-101.2,87.6]],"c":true}]},{"t":19,"s":[{"i":[[0,0],[0,0],[0,-1.8],[39.5,0],[0,30.2],[-39.5,0],[-9.2,-3.3]],"o":[[0,0],[0,0],[0,30.1],[-39.5,0],[0,-30.1],[10.9,0],[0,0]],"v":[[-100.461,-113.925],[-59.1,-114.876],[-60,137],[-131.6,191.599],[-203.2,137],[-131.6,82.4],[-101.2,87.6]],"c":true}],"h":1},{"t":25,"s":[{"i":[[0,0],[0,0],[0,-1.8],[39.5,0],[0,30.2],[-39.5,0],[-9.2,-3.3]],"o":[[0,0],[0,0],[0,30.1],[-39.5,0],[0,-30.1],[10.9,0],[0,0]],"v":[[-101.1,-45.4],[-60.1,-5.9],[-60,137],[-131.6,191.6],[-203.2,137],[-131.6,82.4],[-101.2,87.6]],"c":true}],"h":1}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":1,"op":180,"st":0,"bm":0}],"markers":[]} \ No newline at end of file diff --git a/submodules/TelegramUI/Resources/Animations/anim_sound_on.json b/submodules/TelegramUI/Resources/Animations/anim_sound_on.json new file mode 100644 index 0000000000..f5a9ccb5a5 --- /dev/null +++ b/submodules/TelegramUI/Resources/Animations/anim_sound_on.json @@ -0,0 +1 @@ +{"v":"4.8.0","meta":{"g":"LottieFiles AE ","a":"","k":"","d":"","tc":""},"fr":60,"ip":0,"op":61,"w":512,"h":512,"nm":"Sound On","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"NULL ALL","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.3],"y":[0.919]},"o":{"x":[0.433],"y":[0]},"t":0,"s":[-20]},{"i":{"x":[0.7],"y":[1]},"o":{"x":[0.425],"y":[-0.114]},"t":12,"s":[12]},{"i":{"x":[0.7],"y":[1]},"o":{"x":[0.3],"y":[0]},"t":26,"s":[-4]},{"i":{"x":[0.6],"y":[1]},"o":{"x":[0.3],"y":[0]},"t":39,"s":[4]},{"t":57,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.3,"y":1},"o":{"x":0.3,"y":0},"t":0,"s":[196,376,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.71,"y":1},"o":{"x":0.4,"y":0},"t":18,"s":[256,220,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.71,"y":1},"o":{"x":0.29,"y":0},"t":31,"s":[256,276,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.6,"y":1},"o":{"x":0.29,"y":0},"t":44,"s":[256,232,0],"to":[0,0,0],"ti":[0,0,0]},{"t":60,"s":[256,256,0]}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.3,0.3,0.3],"y":[1,1,1]},"o":{"x":[0.3,0.3,0.3],"y":[0,0,0]},"t":0,"s":[20,0,100]},{"i":{"x":[0.71,0.71,0.71],"y":[1,1,1]},"o":{"x":[0.4,0.4,0.4],"y":[0,0,0]},"t":16,"s":[90,107,100]},{"i":{"x":[0.71,0.71,0.71],"y":[1,1,1]},"o":{"x":[0.29,0.29,0.29],"y":[0,0,0]},"t":29,"s":[105,95,100]},{"i":{"x":[0.6,0.6,0.6],"y":[1,1,1]},"o":{"x":[0.29,0.29,0.29],"y":[0,0,0]},"t":42,"s":[95,105,100]},{"t":58,"s":[100,100,100]}],"ix":6}},"ao":0,"ip":0,"op":180,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Note ON L","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-0.053,-0.397,0],"ix":2},"a":{"a":0,"k":[-0.053,-0.397,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.4,"y":1},"o":{"x":0.6,"y":0},"t":2,"s":[{"i":[[-4.8,-23.2],[0,0.2],[0.8,0],[0,0],[0.2,-0.7],[0,-0.7],[39.7,0],[0,30.1],[-39.7,0],[-9.2,-3.4],[0,0],[-19.2,4.6],[0,0]],"o":[[0.5,11.8],[-0.425,-2.675],[0,0],[-0.8,0.2],[0,0],[0,30.1],[-39.7,0],[0,-30.1],[10.9,0],[0,0],[0,-19.8],[0,0],[23.3,-4.8]],"v":[[203.232,-154.081],[163.782,-144.356],[161.232,-147.481],[-73.733,-106.013],[-75.233,-104.613],[-74.98,161.798],[-146.78,216.298],[-218.68,161.798],[-146.88,107.298],[-116.38,112.498],[-116.433,-104.113],[-83.633,-145.713],[152.532,-187.481]],"c":true}]},{"i":{"x":0.4,"y":1},"o":{"x":0.6,"y":0},"t":12,"s":[{"i":[[-4.8,-23.2],[0,0.2],[0.8,0],[0,0],[0.2,-0.7],[0,-0.7],[39.7,0],[0,30.1],[-39.7,0],[-9.2,-3.4],[0,0],[-19.2,4.6],[0,0]],"o":[[0.5,11.8],[-0.425,-2.675],[0,0],[-0.8,0.2],[0,0],[0,30.1],[-39.7,0],[0,-30.1],[10.9,0],[0,0],[0,-19.8],[0,0],[23.3,-4.8]],"v":[[183.101,-147.811],[143.651,-138.086],[141.101,-141.211],[-35.959,-125.135],[-37.459,-123.735],[-39.2,55.8],[-111,110.3],[-182.9,55.8],[-111.1,1.3],[-80.6,6.5],[-78.659,-123.235],[-45.859,-164.835],[132.401,-181.211]],"c":true}]},{"i":{"x":0.4,"y":1},"o":{"x":0.6,"y":0},"t":25,"s":[{"i":[[-4.8,-23.2],[0,0.2],[0.8,0],[0,0],[0.2,-0.7],[0,-0.7],[39.7,0],[0,30.1],[-39.7,0],[-9.2,-3.4],[0,0],[-19.2,4.6],[0,0]],"o":[[0.5,11.8],[-0.425,-2.675],[0,0],[-0.8,0.2],[0,0],[0,30.1],[-39.7,0],[0,-30.1],[10.9,0],[0,0],[0,-19.8],[0,0],[23.3,-4.8]],"v":[[181.854,-163.321],[142.404,-153.596],[139.854,-156.721],[-38.353,-110.011],[-39.853,-108.611],[-39.6,157.8],[-111.4,212.3],[-183.3,157.8],[-111.5,103.3],[-81,108.5],[-81.053,-108.111],[-48.253,-149.711],[131.154,-196.721]],"c":true}]},{"i":{"x":0.4,"y":1},"o":{"x":0.6,"y":0},"t":38,"s":[{"i":[[-4.8,-23.2],[0,0.2],[0.8,0],[0,0],[0.2,-0.7],[0,-0.7],[39.7,0],[0,30.1],[-39.7,0],[-9.2,-3.4],[0,0],[-19.2,4.6],[0,0]],"o":[[0.5,11.8],[-0.425,-2.675],[0,0],[-0.8,0.2],[0,0],[0,30.1],[-39.7,0],[0,-30.1],[10.9,0],[0,0],[0,-19.8],[0,0],[23.3,-4.8]],"v":[[183.101,-147.811],[143.651,-138.086],[141.101,-141.211],[-36.108,-128.131],[-37.608,-126.731],[-39.2,55.8],[-111,110.3],[-182.9,55.8],[-111.1,1.3],[-80.6,6.5],[-78.808,-126.231],[-46.008,-167.831],[132.401,-181.211]],"c":true}]},{"t":60,"s":[{"i":[[-4.8,-23.2],[0,0.2],[0.8,0],[0,0],[0.2,-0.7],[0,-0.7],[39.7,0],[0,30.1],[-39.7,0],[-9.2,-3.4],[0,0],[-19.2,4.6],[0,0]],"o":[[0.5,11.8],[-0.425,-2.675],[0,0],[-0.8,0.2],[0,0],[0,30.1],[-39.7,0],[0,-30.1],[10.9,0],[0,0],[0,-19.8],[0,0],[23.3,-4.8]],"v":[[182,-157.8],[142.55,-148.075],[140,-151.2],[-38,-115.5],[-39.5,-114.1],[-39.3,136.8],[-111.1,191.3],[-183,136.8],[-111.2,82.3],[-80.7,87.5],[-80.7,-113.6],[-47.9,-155.2],[131.3,-191.2]],"c":true}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":180,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Note ON R","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-0.053,-0.397,0],"ix":2},"a":{"a":0,"k":[-0.053,-0.397,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.4,"y":1},"o":{"x":0.6,"y":0},"t":2,"s":[{"i":[[-22.75,1.55],[0,-0.7],[39.6,0],[0,30.1],[-39.7,0],[-10.4,-4],[0,0.2]],"o":[[1.3,6.5],[0,30.1],[-39.6,0],[0,-30.1],[12.1,0],[0,0],[-0.2,-0.9]],"v":[[205.461,-155.207],[206.207,78.814],[131.007,133.314],[62.607,78.814],[131.007,24.314],[165.207,30.614],[165.261,-147.107]],"c":true}]},{"i":{"x":0.4,"y":1},"o":{"x":0.6,"y":0},"t":12,"s":[{"i":[[-22.75,1.55],[0,-0.7],[39.6,0],[0,30.1],[-39.7,0],[-10.4,-4],[0,0.2]],"o":[[1.3,6.5],[0,30.1],[-39.6,0],[0,-30.1],[12.1,0],[0,0],[-0.2,-0.9]],"v":[[182.963,-149.059],[185.985,150.495],[110.785,204.995],[42.385,150.495],[110.785,95.995],[144.985,102.295],[142.763,-140.959]],"c":true}]},{"i":{"x":0.4,"y":1},"o":{"x":0.6,"y":0},"t":25,"s":[{"i":[[-22.75,1.55],[0,-0.7],[39.6,0],[0,30.1],[-39.7,0],[-10.4,-4],[0,0.2]],"o":[[1.3,6.5],[0,30.1],[-39.6,0],[0,-30.1],[12.1,0],[0,0],[-0.2,-0.9]],"v":[[181.854,-163.321],[182.6,70.7],[107.4,125.2],[39,70.7],[107.4,16.2],[141.6,22.5],[141.654,-155.221]],"c":true}]},{"i":{"x":0.4,"y":1},"o":{"x":0.6,"y":0},"t":38,"s":[{"i":[[-22.75,1.55],[0,-0.7],[39.6,0],[0,30.1],[-39.7,0],[-10.4,-4],[0,0.2]],"o":[[1.3,6.5],[0,30.1],[-39.6,0],[0,-30.1],[12.1,0],[0,0],[-0.2,-0.9]],"v":[[182.963,-149.059],[185.985,150.495],[110.785,204.995],[42.385,150.495],[110.785,95.995],[144.985,102.295],[142.763,-140.959]],"c":true}]},{"t":60,"s":[{"i":[[-22.75,1.55],[0,-0.7],[39.6,0],[0,30.1],[-39.7,0],[-10.4,-4],[0,0.2]],"o":[[1.3,6.5],[0,30.1],[-39.6,0],[0,-30.1],[12.1,0],[0,0],[-0.2,-0.9]],"v":[[182,-157.8],[182.8,102.7],[107.6,157.2],[39.2,102.7],[107.6,48.2],[141.8,54.5],[141.8,-149.7]],"c":true}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":180,"st":0,"bm":0}],"markers":[]} \ No newline at end of file diff --git a/submodules/TelegramUI/Sources/ChatPinnedMessageTitlePanelNode.swift b/submodules/TelegramUI/Sources/ChatPinnedMessageTitlePanelNode.swift index eb0fdbfdfb..b16d821ff4 100644 --- a/submodules/TelegramUI/Sources/ChatPinnedMessageTitlePanelNode.swift +++ b/submodules/TelegramUI/Sources/ChatPinnedMessageTitlePanelNode.swift @@ -316,20 +316,70 @@ final class ChatPinnedMessageTitlePanelNode: ChatTitleAccessoryPanelNode { actionTitle = nil } + var displayCloseButton = false + var displayListButton = false + if isReplyThread || actionTitle != nil { - self.closeButton.isHidden = true - self.listButton.isHidden = true + displayCloseButton = false + displayListButton = false } else if let message = interfaceState.pinnedMessage { if message.totalCount > 1 { - self.listButton.isHidden = false - self.closeButton.isHidden = true + displayCloseButton = false + displayListButton = true } else { - self.listButton.isHidden = true - self.closeButton.isHidden = false + displayCloseButton = true + displayListButton = false } } else { - self.listButton.isHidden = false - self.closeButton.isHidden = true + displayCloseButton = false + displayListButton = true + } + + if displayCloseButton != !self.closeButton.isHidden { + if transition.isAnimated { + if displayCloseButton { + self.closeButton.isHidden = false + self.closeButton.layer.removeAllAnimations() + + self.closeButton.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2) + self.closeButton.layer.animateScale(from: 0.01, to: 1.0, duration: 0.2) + } else { + self.closeButton.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, removeOnCompletion: false, completion: { [weak self] completed in + guard let strongSelf = self, completed else { + return + } + strongSelf.closeButton.isHidden = true + strongSelf.closeButton.layer.removeAllAnimations() + }) + self.closeButton.layer.animateScale(from: 1.0, to: 0.01, duration: 0.2, removeOnCompletion: false) + } + } else { + self.closeButton.isHidden = !displayCloseButton + self.closeButton.layer.removeAllAnimations() + } + } + if displayListButton != !self.listButton.isHidden { + if transition.isAnimated { + if displayListButton { + self.listButton.isHidden = false + self.listButton.layer.removeAllAnimations() + + self.listButton.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2) + self.listButton.layer.animateScale(from: 0.01, to: 1.0, duration: 0.2) + } else { + self.listButton.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, removeOnCompletion: false, completion: { [weak self] completed in + guard let strongSelf = self, completed else { + return + } + strongSelf.listButton.isHidden = true + strongSelf.listButton.layer.removeAllAnimations() + }) + self.listButton.layer.animateScale(from: 1.0, to: 0.01, duration: 0.2, removeOnCompletion: false) + } + } else { + self.listButton.isHidden = !displayCloseButton + self.listButton.layer.removeAllAnimations() + } } let rightInset: CGFloat = 18.0 + rightInset @@ -343,8 +393,21 @@ final class ChatPinnedMessageTitlePanelNode: ChatTitleAccessoryPanelNode { if let actionTitle = actionTitle { var actionButtonTransition = transition + var animateButtonIn = false if self.actionButton.isHidden { actionButtonTransition = .immediate + animateButtonIn = true + } else if transition.isAnimated, messageUpdated, actionTitle != self.actionButtonTitleNode.attributedText?.string { + if let buttonSnapshot = self.actionButton.view.snapshotView(afterScreenUpdates: false) { + animateButtonIn = true + buttonSnapshot.frame = self.actionButton.frame + self.actionButton.view.superview?.insertSubview(buttonSnapshot, belowSubview: self.actionButton.view) + + buttonSnapshot.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, removeOnCompletion: false, completion: { [weak buttonSnapshot] _ in + buttonSnapshot?.removeFromSuperview() + }) + buttonSnapshot.layer.animateScale(from: 1.0, to: 0.01, duration: 0.2) + } } self.actionButton.isHidden = false @@ -361,10 +424,27 @@ final class ChatPinnedMessageTitlePanelNode: ChatTitleAccessoryPanelNode { actionButtonTransition.updateFrame(node: self.actionButtonTitleNode, frame: CGRect(origin: CGPoint(x: floorToScreenPixels((actionButtonFrame.width - actionButtonTitleSize.width) / 2.0), y: floorToScreenPixels((actionButtonFrame.height - actionButtonTitleSize.height) / 2.0)), size: actionButtonTitleSize)) tapButtonRightInset = 18.0 + actionButtonFrame.width - } else { + + if animateButtonIn { + self.actionButton.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2) + self.actionButton.layer.animateScale(from: 0.01, to: 1.0, duration: 0.2) + } + } else if !self.actionButton.isHidden { self.actionButton.isHidden = true self.actionButtonBackgroundNode.isHidden = true self.actionButtonTitleNode.isHidden = true + + if transition.isAnimated { + if let buttonSnapshot = self.actionButton.view.snapshotView(afterScreenUpdates: false) { + buttonSnapshot.frame = self.actionButton.frame + self.actionButton.view.superview?.insertSubview(buttonSnapshot, belowSubview: self.actionButton.view) + + buttonSnapshot.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, removeOnCompletion: false, completion: { [weak buttonSnapshot] _ in + buttonSnapshot?.removeFromSuperview() + }) + buttonSnapshot.layer.animateScale(from: 1.0, to: 0.01, duration: 0.2) + } + } } transition.updateFrame(node: self.closeButton, frame: CGRect(origin: CGPoint(x: buttonsContainerSize.width - closeButtonSize.width + 1.0, y: 19.0), size: closeButtonSize)) diff --git a/submodules/TelegramUI/Sources/ChatTimerScreen.swift b/submodules/TelegramUI/Sources/ChatTimerScreen.swift index 045cbc863c..cc5fc07b6b 100644 --- a/submodules/TelegramUI/Sources/ChatTimerScreen.swift +++ b/submodules/TelegramUI/Sources/ChatTimerScreen.swift @@ -487,6 +487,8 @@ class ChatTimerScreenNode: ViewControllerTracingNode, UIScrollViewDelegate, UIPi if #available(iOS 13.4, *) { pickerView.preferredDatePickerStyle = .wheels } + pickerView.setValue(self.presentationData.theme.list.itemPrimaryTextColor, forKey: "textColor") + pickerView.setValue(false, forKey: "highlightsToday") pickerView.selectorColor = UIColor(rgb: 0xffffff, alpha: 0.18) pickerView.addTarget(self, action: #selector(self.dataPickerChanged), for: .valueChanged) diff --git a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift index 7805ec236b..bd0c278f4a 100644 --- a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift +++ b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift @@ -1857,7 +1857,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate UIPasteboard.general.string = linkForCopying let presentationData = context.sharedContext.currentPresentationData.with { $0 } - self?.controller?.present(UndoOverlayController(presentationData: presentationData, content: .linkCopied(text: presentationData.strings.Conversation_LinkCopied), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .window(.root)) + self?.controller?.present(UndoOverlayController(presentationData: presentationData, content: .linkCopied(text: presentationData.strings.Conversation_LinkCopied), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .current) }))) } @@ -2898,7 +2898,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate if let strongSelf = self { let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 } - strongSelf.controller?.present(UndoOverlayController(presentationData: presentationData, content: .copy(text: presentationData.strings.Conversation_PhoneCopied), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .window(.root)) + strongSelf.controller?.present(UndoOverlayController(presentationData: presentationData, content: .copy(text: presentationData.strings.Conversation_PhoneCopied), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .current) } })) } @@ -2909,7 +2909,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate if let strongSelf = self { let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 } - strongSelf.controller?.present(UndoOverlayController(presentationData: presentationData, content: .copy(text: presentationData.strings.Conversation_UsernameCopied), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .window(.root)) + strongSelf.controller?.present(UndoOverlayController(presentationData: presentationData, content: .copy(text: presentationData.strings.Conversation_UsernameCopied), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .current) } })) } @@ -3534,6 +3534,15 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate case .mute: if let notificationSettings = self.data?.notificationSettings, case .muted = notificationSettings.muteState { let _ = self.context.engine.peers.updatePeerMuteSetting(peerId: self.peerId, muteInterval: nil).start() + + let iconColor: UIColor = .white + self.controller?.present(UndoOverlayController(presentationData: self.presentationData, content: .universal(animation: "anim_profileunmute", scale: 0.075, colors: [ + "Middle.Group 1.Fill 1": iconColor, + "Top.Group 1.Fill 1": iconColor, + "Bottom.Group 1.Fill 1": iconColor, + "EXAMPLE.Group 1.Fill 1": iconColor, + "Line.Group 1.Stroke 1": iconColor + ], title: nil, text: self.presentationData.strings.PeerInfo_TooltipUnmuted), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .current) } else { self.state = self.state.withHighlightedButton(.mute) if let (layout, navigationHeight) = self.validLayout { @@ -3574,6 +3583,8 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate return } let _ = strongSelf.context.engine.peers.updatePeerMuteSetting(peerId: strongSelf.peerId, muteInterval: value).start() + + strongSelf.controller?.present(UndoOverlayController(presentationData: strongSelf.presentationData, content: .universal(animation: "anim_mute_for", scale: 0.066, colors: [:], title: nil, text: strongSelf.presentationData.strings.PeerInfo_TooltipMutedFor(mutedForTimeIntervalString(strings: strongSelf.presentationData.strings, value: value)).string), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .current) }))) } @@ -3610,6 +3621,8 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate return } let _ = strongSelf.context.engine.peers.updatePeerNotificationSoundInteractive(peerId: strongSelf.peerId, sound: .default).start() + + strongSelf.controller?.present(UndoOverlayController(presentationData: strongSelf.presentationData, content: .universal(animation: "anim_sound_on", scale: 0.056, colors: [:], title: nil, text: strongSelf.presentationData.strings.PeerInfo_TooltipSoundEnabled), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .current) }))) } else { items.append(.action(ContextMenuActionItem(text: self.presentationData.strings.PeerInfo_DisableSound, icon: { theme in @@ -3621,6 +3634,8 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate return } let _ = strongSelf.context.engine.peers.updatePeerNotificationSoundInteractive(peerId: strongSelf.peerId, sound: .none).start() + + strongSelf.controller?.present(UndoOverlayController(presentationData: strongSelf.presentationData, content: .universal(animation: "anim_sound_off", scale: 0.056, colors: [:], title: nil, text: strongSelf.presentationData.strings.PeerInfo_TooltipSoundDisabled), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .current) }))) } @@ -3655,7 +3670,12 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate }, updatePeerNotificationInterval: { peerId, muteInterval in let _ = (updatePeerNotificationInterval(peerId, muteInterval) |> deliverOnMainQueue).start(next: { _ in - + guard let strongSelf = self else { + return + } + if let muteInterval = muteInterval, muteInterval == Int32.max { + strongSelf.controller?.present(UndoOverlayController(presentationData: strongSelf.presentationData, content: .universal(animation: "anim_mute_for", scale: 0.056, colors: [:], title: nil, text: strongSelf.presentationData.strings.PeerInfo_TooltipMutedForever), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .current) + } }) }, updatePeerDisplayPreviews: { peerId, displayPreviews in let _ = (updatePeerDisplayPreviews(peerId, displayPreviews) @@ -3680,6 +3700,8 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate } let _ = strongSelf.context.engine.peers.updatePeerMuteSetting(peerId: strongSelf.peerId, muteInterval: Int32.max).start() + + strongSelf.controller?.present(UndoOverlayController(presentationData: strongSelf.presentationData, content: .universal(animation: "anim_mute_for", scale: 0.056, colors: [:], title: nil, text: strongSelf.presentationData.strings.PeerInfo_TooltipMutedForever), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .current) }))) self.view.endEditing(true) @@ -3941,7 +3963,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate } } - strongSelf.controller?.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: savedMessages, text: text), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .window(.root)) + strongSelf.controller?.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: savedMessages, text: text), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .current) } }) } @@ -4199,6 +4221,10 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate let _ = strongSelf.context.engine.peers.updatePeerMuteSetting(peerId: strongSelf.peerId, muteInterval: nil).start() } else { let _ = strongSelf.context.engine.peers.updatePeerMuteSetting(peerId: strongSelf.peerId, muteInterval: value).start() + + let timeString = stringForPreciseRelativeTimestamp(strings: strongSelf.presentationData.strings, relativeTimestamp: Int32(Date().timeIntervalSince1970) + value, relativeTo: Int32(Date().timeIntervalSince1970), dateTimeFormat: strongSelf.presentationData.dateTimeFormat) + + strongSelf.controller?.present(UndoOverlayController(presentationData: strongSelf.presentationData, content: .universal(animation: "anim_mute_for", scale: 0.056, colors: [:], title: nil, text: strongSelf.presentationData.strings.PeerInfo_TooltipMutedUntil(timeString).string), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .current) } }) self.controller?.view.endEditing(true) @@ -4422,7 +4448,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate } } - strongSelf.controller?.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: savedMessages, text: text), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .window(.root)) + strongSelf.controller?.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: savedMessages, text: text), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .current) } }) } @@ -4430,7 +4456,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate shareController.actionCompleted = { [weak self] in if let strongSelf = self { let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 } - strongSelf.controller?.present(UndoOverlayController(presentationData: presentationData, content: .linkCopied(text: presentationData.strings.Conversation_LinkCopied), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .window(.root)) + strongSelf.controller?.present(UndoOverlayController(presentationData: presentationData, content: .linkCopied(text: presentationData.strings.Conversation_LinkCopied), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .current) } } self.view.endEditing(true) @@ -5151,7 +5177,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate } } - strongSelf.controller?.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: savedMessages, text: text), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .window(.root)) + strongSelf.controller?.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: savedMessages, text: text), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .current) } }) } @@ -5159,7 +5185,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate shareController.actionCompleted = { [weak self] in if let strongSelf = self { let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 } - strongSelf.controller?.present(UndoOverlayController(presentationData: presentationData, content: .linkCopied(text: presentationData.strings.Conversation_LinkCopied), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .window(.root)) + strongSelf.controller?.present(UndoOverlayController(presentationData: presentationData, content: .linkCopied(text: presentationData.strings.Conversation_LinkCopied), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .current) } } strongSelf.view.endEditing(true) @@ -5409,7 +5435,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate var actions: [ContextMenuAction] = [ContextMenuAction(content: .text(title: presentationData.strings.Conversation_ContextMenuCopy, accessibilityLabel: presentationData.strings.Conversation_ContextMenuCopy), action: { [weak self] in UIPasteboard.general.string = text - self?.controller?.present(UndoOverlayController(presentationData: presentationData, content: .copy(text: presentationData.strings.Conversation_TextCopied), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .window(.root)) + self?.controller?.present(UndoOverlayController(presentationData: presentationData, content: .copy(text: presentationData.strings.Conversation_TextCopied), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .current) })] let (canTranslate, language) = canTranslateText(context: context, text: text, showTranslate: translationSettings.showTranslate, showTranslateIfTopical: false, ignoredLanguages: translationSettings.ignoredLanguages) @@ -5436,7 +5462,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate UIPasteboard.general.string = phone let presentationData = context.sharedContext.currentPresentationData.with { $0 } - self?.controller?.present(UndoOverlayController(presentationData: presentationData, content: .copy(text: presentationData.strings.Conversation_PhoneCopied), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .window(.root)) + self?.controller?.present(UndoOverlayController(presentationData: presentationData, content: .copy(text: presentationData.strings.Conversation_PhoneCopied), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .current) })]) controller.present(contextMenuController, in: .window(.root), with: ContextMenuControllerPresentationArguments(sourceNodeAndRect: { [weak self, weak sourceNode] in if let controller = self?.controller, let sourceNode = sourceNode { @@ -5460,7 +5486,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate UIPasteboard.general.string = text let presentationData = context.sharedContext.currentPresentationData.with { $0 } - self?.controller?.present(UndoOverlayController(presentationData: presentationData, content: content, elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .window(.root)) + self?.controller?.present(UndoOverlayController(presentationData: presentationData, content: content, elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .current) })]) controller.present(contextMenuController, in: .window(.root), with: ContextMenuControllerPresentationArguments(sourceNodeAndRect: { [weak self, weak sourceNode] in if let controller = self?.controller, let sourceNode = sourceNode { @@ -6352,7 +6378,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate if let strongSelf = self, let _ = peerSelectionController { if peerId == strongSelf.context.account.peerId { let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 } - strongSelf.controller?.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: true, text: messageIds.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_SavedMessages_One : presentationData.strings.Conversation_ForwardTooltip_SavedMessages_Many), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .window(.root)) + strongSelf.controller?.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: true, text: messageIds.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_SavedMessages_One : presentationData.strings.Conversation_ForwardTooltip_SavedMessages_Many), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .current) strongSelf.headerNode.navigationButtonContainer.performAction?(.selectionDone, nil, nil) @@ -7874,6 +7900,12 @@ public final class PeerInfoScreenImpl: ViewController, PeerInfoScreen { }) } + override public func present(_ controller: ViewController, in context: PresentationContextType, with arguments: Any? = nil, blockInteraction: Bool = false, completion: @escaping () -> Void = {}) { + self.dismissAllTooltips() + + super.present(controller, in: context, with: arguments, blockInteraction: blockInteraction, completion: completion) + } + override public func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) diff --git a/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm b/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm index 07bc2a1cf2..8f6e7c171e 100644 --- a/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm +++ b/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm @@ -5,6 +5,7 @@ #import "Instance.h" #import "InstanceImpl.h" #import "v2/InstanceV2Impl.h" +#import "v2_4_0_0/InstanceV2_4_0_0Impl.h" #include "StaticThreads.h" #import "VideoCaptureInterface.h" @@ -918,6 +919,7 @@ static void (*InternalVoipLoggingFunction)(NSString *) = NULL; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ tgcalls::Register(); + tgcalls::Register(); tgcalls::Register(); }); diff --git a/submodules/TgVoipWebrtc/tgcalls b/submodules/TgVoipWebrtc/tgcalls index 96b2bbf3a7..4c1a39c67d 160000 --- a/submodules/TgVoipWebrtc/tgcalls +++ b/submodules/TgVoipWebrtc/tgcalls @@ -1 +1 @@ -Subproject commit 96b2bbf3a7b352924998e93c649ef30174a1a433 +Subproject commit 4c1a39c67d4b03dd96ac82a9aa2420243f5bd106 diff --git a/submodules/UndoUI/Sources/UndoOverlayController.swift b/submodules/UndoUI/Sources/UndoOverlayController.swift index e4a4f49ee8..b3e52fd0a5 100644 --- a/submodules/UndoUI/Sources/UndoOverlayController.swift +++ b/submodules/UndoUI/Sources/UndoOverlayController.swift @@ -41,6 +41,7 @@ public enum UndoOverlayContent { case inviteRequestSent(title: String, text: String) case image(image: UIImage, text: String) case notificationSoundAdded(title: String, text: String, action: (() -> Void)?) + case universal(animation: String, scale: CGFloat, colors: [String: UIColor], title: String?, text: String) } public enum UndoOverlayAction { diff --git a/submodules/UndoUI/Sources/UndoOverlayControllerNode.swift b/submodules/UndoUI/Sources/UndoOverlayControllerNode.swift index 0c2db0c79b..dd6df51216 100644 --- a/submodules/UndoUI/Sources/UndoOverlayControllerNode.swift +++ b/submodules/UndoUI/Sources/UndoOverlayControllerNode.swift @@ -789,6 +789,29 @@ final class UndoOverlayControllerNode: ViewControllerTracingNode { } } } + case let .universal(animation, scale, colors, title, text): + self.avatarNode = nil + self.iconNode = nil + self.iconCheckNode = nil + self.animationNode = AnimationNode(animation: animation, colors: colors, scale: scale) + self.animatedStickerNode = nil + if let title = title { + self.titleNode.attributedText = NSAttributedString(string: title, font: Font.semibold(14.0), textColor: .white) + } else { + self.titleNode.attributedText = nil + } + + let body = MarkdownAttributeSet(font: Font.regular(14.0), textColor: .white) + let bold = MarkdownAttributeSet(font: Font.semibold(14.0), textColor: .white) + let link = MarkdownAttributeSet(font: Font.regular(14.0), textColor: undoTextColor) + let attributedText = parseMarkdownIntoAttributedString(text, attributes: MarkdownAttributes(body: body, bold: bold, link: link, linkAttribute: { contents in + return ("URL", contents) + }), textAlignment: .natural) + self.textNode.attributedText = attributedText + + self.textNode.maximumNumberOfLines = 5 + displayUndo = false + self.originalRemainingSeconds = 3 case let .image(image, text): self.avatarNode = nil self.iconNode = ASImageNode() @@ -831,7 +854,7 @@ final class UndoOverlayControllerNode: ViewControllerTracingNode { switch content { case .removedChat: self.panelWrapperNode.addSubnode(self.timerTextNode) - case .archivedChat, .hidArchive, .revealedArchive, .autoDelete, .succeed, .emoji, .swipeToReply, .actionSucceeded, .stickersModified, .chatAddedToFolder, .chatRemovedFromFolder, .messagesUnpinned, .setProximityAlert, .invitedToVoiceChat, .linkCopied, .banned, .importedMessage, .audioRate, .forward, .gigagroupConversion, .linkRevoked, .voiceChatRecording, .voiceChatFlag, .voiceChatCanSpeak, .sticker, .copy, .mediaSaved, .paymentSent, .image, .inviteRequestSent, .notificationSoundAdded: + case .archivedChat, .hidArchive, .revealedArchive, .autoDelete, .succeed, .emoji, .swipeToReply, .actionSucceeded, .stickersModified, .chatAddedToFolder, .chatRemovedFromFolder, .messagesUnpinned, .setProximityAlert, .invitedToVoiceChat, .linkCopied, .banned, .importedMessage, .audioRate, .forward, .gigagroupConversion, .linkRevoked, .voiceChatRecording, .voiceChatFlag, .voiceChatCanSpeak, .sticker, .copy, .mediaSaved, .paymentSent, .image, .inviteRequestSent, .notificationSoundAdded, .universal: if self.textNode.tapAttributeAction != nil { self.isUserInteractionEnabled = true } else {