Skip to content

Commit 9ac6774

Browse files
committed
remove stale references to App.Store
fixes the NRE when opening the add contact page
1 parent 7c325d8 commit 9ac6774

File tree

4 files changed

+2
-6
lines changed

4 files changed

+2
-6
lines changed

Signal-Windows/App.xaml.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ sealed partial class App : Application
3535
public static string URL = "https://textsecure-service.whispersystems.org";
3636
public static SignalServiceUrl[] ServiceUrls = new SignalServiceUrl[] { new SignalServiceUrl(URL, null) };
3737
public static StorageFolder LocalCacheFolder = ApplicationData.Current.LocalCacheFolder;
38-
public static SignalStore Store;
3938
public static bool MainPageActive = false;
4039
public static string USER_AGENT = "Signal-Windows";
4140
public static uint PREKEY_BATCH_SIZE = 100;

Signal-Windows/ViewModels/AddContactPageViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public async Task RefreshContacts(CancellationToken? cancellationToken = null)
116116
RefreshingContacts = true;
117117
Contacts.Clear();
118118
signalContacts.Clear();
119-
SignalServiceAccountManager accountManager = new SignalServiceAccountManager(App.ServiceUrls, App.Store.Username, App.Store.Password, (int)App.Store.DeviceId, App.USER_AGENT);
119+
SignalServiceAccountManager accountManager = new SignalServiceAccountManager(App.ServiceUrls, App.Handle.Store.Username, App.Handle.Store.Password, (int)App.Handle.Store.DeviceId, App.USER_AGENT);
120120
ContactStore contactStore = await ContactManager.RequestStoreAsync(ContactStoreAccessType.AllContactsReadOnly);
121121
List<PhoneContact> intermediateContacts = new List<PhoneContact>();
122122
if (contactStore != null)

Signal-Windows/ViewModels/FinishRegistrationPageViewModel.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ await Task.Run(() =>
4545
LibsignalDBContext.SaveOrUpdateSignalStore(store);
4646
Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
4747
{
48-
App.Store = store;
4948
App.Handle.Store = store;
5049
}).AsTask().Wait();
5150

@@ -57,7 +56,7 @@ await Task.Run(() =>
5756
store = LibsignalDBContext.GetSignalStore();
5857
Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
5958
{
60-
App.Store = store;
59+
App.Handle.Store = store;
6160
}).AsTask().Wait();
6261
});
6362
View.Frame.Navigate(typeof(MainPage));

Signal-Windows/ViewModels/LinkPageViewModel.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ public async Task BeginLinking()
113113
Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
114114
{
115115
UIEnabled = false;
116-
App.Store = store;
117116
App.Handle.Store = store;
118117
}).AsTask().Wait();
119118

@@ -124,7 +123,6 @@ public async Task BeginLinking()
124123
store = LibsignalDBContext.GetSignalStore();
125124
Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
126125
{
127-
App.Store = store;
128126
App.Handle.Store = store;
129127
View.Finish(true);
130128
}).AsTask().Wait();

0 commit comments

Comments
 (0)