Skip to content

Commit

Permalink
1.9.8 (453)
Browse files Browse the repository at this point in the history
  • Loading branch information
denis15yo committed Feb 21, 2025
1 parent 5743bde commit 9a392ae
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 18 deletions.
8 changes: 4 additions & 4 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Nicegram/NGUtils/Sources/Analytics/SpyOnFriendsAnalytics.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Foundation
import NGAnalytics

public enum SpyOnFriendsAnalyticsEvent: String {
case show = "spy_friends_show"
}

public func sendSpyOnFriendsAnalytics(with event: SpyOnFriendsAnalyticsEvent) {
let analyticsManager = AnalyticsContainer.shared.analyticsManager()
analyticsManager.trackEvent(
event.rawValue,
params: [:]
)
}
8 changes: 4 additions & 4 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,17 @@
"kind" : "remoteSourceControl",
"location" : "git@bitbucket.org:mobyrix/nicegram-assistant-ios.git",
"state" : {
"branch" : "feat/NCG-7303_spy_on_friends",
"revision" : "84961d2992385fb7645a51bb1d32747cc1acadd1"
"branch" : "develop",
"revision" : "21e5bc1689bd362b7a0858abccd0b4acffc825b9"
}
},
{
"identity" : "nicegram-wallet-ios",
"kind" : "remoteSourceControl",
"location" : "git@bitbucket.org:mobyrix/nicegram-wallet-ios.git",
"state" : {
"branch" : "feat/NCG-7303_spy_on_friends",
"revision" : "0d12be95114430db63569f04a08ec962733ed2d7"
"branch" : "develop",
"revision" : "63ea2a8342b31467d251a406cf4e72f02fc842eb"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PackageDescription
let package = Package(
name: "nicegram-package",
dependencies: [
.package(url: "git@bitbucket.org:mobyrix/nicegram-assistant-ios.git", branch: "feat/NCG-7303_spy_on_friends"),
.package(url: "git@bitbucket.org:mobyrix/nicegram-wallet-ios.git", branch: "feat/NCG-7303_spy_on_friends")
.package(url: "git@bitbucket.org:mobyrix/nicegram-assistant-ios.git", branch: "develop"),
.package(url: "git@bitbucket.org:mobyrix/nicegram-wallet-ios.git", branch: "develop")
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ final class SpyOnFriendsPaneNode: ASDisplayNode, PeerInfoPaneNode {
private let context: AccountContext
private let peerId: PeerId
private let chatControllerInteraction: ChatControllerInteraction
private let openPeerContextAction: (Bool, Peer, ASDisplayNode, ContextGesture?) -> Void
private let spyOnFriendsContext: SpyOnFriendsContext

private let feature = SpyOnFriendsFeature(navigator: SpyOnFriendsNavigatorImpl())
Expand Down Expand Up @@ -203,13 +202,11 @@ final class SpyOnFriendsPaneNode: ASDisplayNode, PeerInfoPaneNode {
context: AccountContext,
peerId: PeerId,
chatControllerInteraction: ChatControllerInteraction,
openPeerContextAction: @escaping (Bool, Peer, ASDisplayNode, ContextGesture?) -> Void,
spyOnFriendsContext: SpyOnFriendsContext
) {
self.context = context
self.peerId = peerId
self.chatControllerInteraction = chatControllerInteraction
self.openPeerContextAction = openPeerContextAction
self.spyOnFriendsContext = spyOnFriendsContext

let presentationData = context.sharedContext.currentPresentationData.with { $0 }
Expand Down Expand Up @@ -286,7 +283,6 @@ final class SpyOnFriendsPaneNode: ASDisplayNode, PeerInfoPaneNode {
) {
let isFirstLayout = self.currentParams == nil
self.currentParams = (size, isScrollingLockedAtTop, presentationData)

self.coveringView.backgroundColor = presentationData.theme.list.itemBlocksBackgroundColor
transition.updateFrame(view: self.coveringView, frame: CGRect(origin: CGPoint(x: 0.0, y: -1.0), size: CGSize(width: size.width, height: topInset + 1.0)))

Expand Down Expand Up @@ -935,7 +931,7 @@ class SpyOnFriendsUnlockNode: ListViewItemNode {
{ _ in }
)
}

unlockView.setup(
with: item.theme.list.itemAccentColor,
backgroundColor: item.theme.list.itemBlocksBackgroundColor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import TextFormat
import EmojiTextAttachmentView
// MARK: Nicegram NCG-7303 Spy on friends
import NGStrings
import NGUtils
//
final class PeerInfoPaneWrapper {
let key: PeerInfoPaneKey
Expand Down Expand Up @@ -211,6 +212,13 @@ final class PeerInfoPaneTabsContainerNode: ASDisplayNode {
self.paneNodes[specifier.key] = paneNode
}
paneNode.updateText(context: self.context, title: specifier.title, icons: specifier.icons, isSelected: selectedPane == specifier.key, presentationData: presentationData)
// MARK: Nicegram NCG-7303 Spy on friends
if #available(iOS 15.0, *),
selectedPane == specifier.key &&
specifier.key == .spyOnFriends {
sendSpyOnFriendsAnalytics(with: .show)
}
//
}
var removeKeys: [PeerInfoPaneKey] = []
for (key, _) in self.paneNodes {
Expand Down Expand Up @@ -555,13 +563,13 @@ private final class PeerInfoPendingPane {
paneNode = PeerInfoChatPaneNode(context: context, peerId: peerId, navigationController: chatControllerInteraction.navigationController)
// MARK: Nicegram NCG-7303 Spy on friends
case .spyOnFriends:
if #available(iOS 15.0, *) {
if #available(iOS 15.0, *),
let spyOnFriendsContext = data.spyOnFriends {
paneNode = SpyOnFriendsPaneNode(
context: context,
peerId: peerId,
chatControllerInteraction: chatControllerInteraction,
openPeerContextAction: openPeerContextAction,
spyOnFriendsContext: data.spyOnFriends!
spyOnFriendsContext: spyOnFriendsContext
)
} else {
preconditionFailure()
Expand Down

0 comments on commit 9a392ae

Please sign in to comment.