Skip to content

Commit

Permalink
Remove leftover extendedActions && FIXME
Browse files Browse the repository at this point in the history
  • Loading branch information
khmMouna committed Oct 24, 2023
1 parent b65d149 commit 5492f42
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 36 deletions.
6 changes: 0 additions & 6 deletions Airship.Net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.Core",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.Automation", "src\AirshipBindings.iOS.Automation\AirshipBindings.iOS.Automation.csproj", "{70434FB5-A468-4777-9478-DD2AB80BE0E2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.ExtendedActions", "src\AirshipBindings.iOS.ExtendedActions\AirshipBindings.iOS.ExtendedActions.csproj", "{BFFFE653-04CD-4563-BF2D-B6F31349F30D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirshipBindings.iOS.MessageCenter", "src\AirshipBindings.iOS.MessageCenter\AirshipBindings.iOS.MessageCenter.csproj", "{AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Airship.Net", "src\Airship.Net\Airship.Net.csproj", "{C419463A-31A8-477B-A99E-1B0947AA416B}"
Expand Down Expand Up @@ -89,10 +87,6 @@ Global
{70434FB5-A468-4777-9478-DD2AB80BE0E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{70434FB5-A468-4777-9478-DD2AB80BE0E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{70434FB5-A468-4777-9478-DD2AB80BE0E2}.Release|Any CPU.Build.0 = Release|Any CPU
{BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BFFFE653-04CD-4563-BF2D-B6F31349F30D}.Release|Any CPU.Build.0 = Release|Any CPU
{AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC22EEC5-DCA6-49D3-8B37-533B5565E2CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
3 changes: 1 addition & 2 deletions Airship.iOS.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
"src\\AirshipBindings.iOS.Basement\\AirshipBindings.iOS.Basement.csproj",
"src\\AirshipBindings.iOS.Core\\AirshipBindings.iOS.Core.csproj",
"src\\AirshipBindings.iOS.Automation\\AirshipBindings.iOS.Automation.csproj",
"src\\AirshipBindings.iOS.ExtendedActions\\AirshipBindings.iOS.ExtendedActions.csproj",
"src\\AirshipBindings.iOS.MessageCenter\\AirshipBindings.iOS.MessageCenter.csproj",
"src\\AirshipBindings.iOS.NotificationContentExtension\\AirshipBindings.iOS.NotificationContentExtension.csproj",
"src\\AirshipBindings.iOS.NotificationServiceExtension\\AirshipBindings.iOS.NotificationServiceExtension.csproj",
"src\\AirshipBindings.iOS.PreferenceCenter\\AirshipBindings.iOS.PreferenceCenter.csproj"
]
}
}
}
6 changes: 2 additions & 4 deletions MauiSample/HomePageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,15 @@ public HomePageViewModel()
OnPrefCenterButtonClicked = new Command(PerformOnPrefCenterButtonClicked);

Airship.Instance.OnChannelCreation += OnChannelEvent;
// FIXME:
//Airship.Instance.OnPushNotificationStatusUpdate += OnPushNotificationStatusEvent;
Airship.Instance.OnPushNotificationStatusUpdate += OnPushNotificationStatusEvent;

Refresh();
}

~HomePageViewModel()
{
Airship.Instance.OnChannelCreation -= OnChannelEvent;
// FIXME:
//Airship.Instance.OnPushNotificationStatusUpdate -= OnPushNotificationStatusEvent;
Airship.Instance.OnPushNotificationStatusUpdate -= OnPushNotificationStatusEvent;
}

private void OnChannelEvent(object sender, EventArgs e) => Refresh();
Expand Down
7 changes: 5 additions & 2 deletions MauiSample/MessageCenterPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ public void Refresh()
{
Airship.Instance.InboxMessages(messages =>
{
listView.ItemsSource = messages;
refreshView.IsRefreshing = false;
MainThread.BeginInvokeOnMainThread(() =>
{
listView.ItemsSource = messages;
refreshView.IsRefreshing = false;
});
});
}

Expand Down
15 changes: 7 additions & 8 deletions MauiSample/PushSettingsViewController.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,12 @@ void UpdateTagsCell()
void UpdateNamedUser()
{
namedUserLabel.Text = "";
// FIXME:
// Airship.Instance.GetNamedUser(namedUser =>
// {
// Device.BeginInvokeOnMainThread(() =>
// {
// namedUserLabel.Placeholder = namedUser != null ? namedUser : "named user";
// });
// });
Airship.Instance.GetNamedUser(namedUser =>
{
MainThread.BeginInvokeOnMainThread(() =>
{
namedUserLabel.Placeholder = namedUser != null ? namedUser : "named user";
});
});
}
}
27 changes: 13 additions & 14 deletions src/Airship.Net/Platforms/iOS/Airship.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,19 @@ private void Initialize()
OnChannelCreation?.Invoke(this, new ChannelEventArgs(channelID));
});

// FIXME:
//NSNotificationCenter.DefaultCenter.AddObserver(aName: (NSString)UAPush.NotificationStatusUpdateEvent, (notification) =>
//{
// OnPushNotificationStatusUpdate?.Invoke(this,
// new PushNotificationStatusEventArgs(
// notification.UserInfo[UAPush.IsUserNotificationsEnabled].Equals((NSNumber)1),
// notification.UserInfo[UAPush.AreNotificationsAllowed].Equals((NSNumber)1),
// notification.UserInfo[UAPush.IsPushPrivacyFeatureEnabled].Equals((NSNumber)1),
// notification.UserInfo[UAPush.IsPushTokenRegistered].Equals((NSNumber)1),
// notification.UserInfo[UAPush.IsUserOptedIn].Equals((NSNumber)1),
// notification.UserInfo[UAPush.IsOptedIn].Equals((NSNumber)1)
// )
// );
//});
NSNotificationCenter.DefaultCenter.AddObserver(aName: (NSString)UAPush.NotificationStatusUpdateEvent, (notification) =>
{
OnPushNotificationStatusUpdate?.Invoke(this,
new PushNotificationStatusEventArgs(
notification.UserInfo[UAPush.IsUserNotificationsEnabled].Equals((NSNumber)1),

Check warning on line 37 in src/Airship.Net/Platforms/iOS/Airship.cs

View workflow job for this annotation

GitHub Actions / ci

Dereference of a possibly null reference.
notification.UserInfo[UAPush.AreNotificationsAllowed].Equals((NSNumber)1),
notification.UserInfo[UAPush.IsPushPrivacyFeatureEnabled].Equals((NSNumber)1),
notification.UserInfo[UAPush.IsPushTokenRegistered].Equals((NSNumber)1),
notification.UserInfo[UAPush.IsUserOptedIn].Equals((NSNumber)1),
notification.UserInfo[UAPush.IsOptedIn].Equals((NSNumber)1)
)
);
});

//Adding Inbox updated Listener
NSNotificationCenter.DefaultCenter.AddObserver(aName: (NSString)"com.urbanairship.notification.message_list_updated", (notification) =>
Expand Down

0 comments on commit 5492f42

Please sign in to comment.