@@ -199,7 +199,9 @@ class StockMarketAlertsPageState extends State<StockMarketAlertsPage> {
199
199
iconTheme: IconThemeData (color: Colors .white),
200
200
elevation: _settingsP! .appBarTop ? 2 : 0 ,
201
201
systemOverlayStyle: SystemUiOverlayStyle .light,
202
- title: const Text ("Stock market alerts" , style: TextStyle (color: Colors .white)),
202
+ title: Platform .isWindows
203
+ ? const Text ("Stock market" , style: TextStyle (color: Colors .white))
204
+ : const Text ("Stock market alerts" , style: TextStyle (color: Colors .white)),
203
205
leadingWidth: _webViewProvider.webViewSplitActive ? 50 : 88 ,
204
206
leading: Row (
205
207
children: [
@@ -317,7 +319,7 @@ class StockMarketAlertsPageState extends State<StockMarketAlertsPage> {
317
319
try {
318
320
// If we call from the main menu, we have to get the fbUser before loading anything, as it won't come from
319
321
// the alerts pages, like in other cases
320
- if (widget.calledFromMenu) {
322
+ if (widget.calledFromMenu && ! Platform .isWindows ) {
321
323
_fbUser = await FirestoreHelper ().getUserProfile (); // We are NOT getting updated stocks every time
322
324
}
323
325
@@ -372,19 +374,21 @@ class StockMarketAlertsPageState extends State<StockMarketAlertsPage> {
372
374
}
373
375
374
376
// Complete details based on what's saved in Firebase
375
- for (final fbAlert in _fbUser! .stockMarketShares) {
376
- final acronym = fbAlert.toString ().substring (0 , 3 );
377
- final regex = RegExp (r"[A-Z]+-G-((?:\d+(?:\.)?(?:\d{1,2}))|n)-L-((?:\d+(?:\.)?(?:\d{1,2}))|n)" );
378
- final match = regex.firstMatch (fbAlert.toString ())! ;
379
- final fbGain = match.group (1 );
380
- final fbLoss = match.group (2 );
381
- for (final listedStock in _stockList) {
382
- if (listedStock.acronym == acronym) {
383
- if (fbGain != "n" ) {
384
- listedStock.alertGain = double .tryParse (fbGain! );
385
- }
386
- if (fbLoss != "n" ) {
387
- listedStock.alertLoss = double .tryParse (fbLoss! );
377
+ if (! Platform .isWindows) {
378
+ for (final fbAlert in _fbUser! .stockMarketShares) {
379
+ final acronym = fbAlert.toString ().substring (0 , 3 );
380
+ final regex = RegExp (r"[A-Z]+-G-((?:\d+(?:\.)?(?:\d{1,2}))|n)-L-((?:\d+(?:\.)?(?:\d{1,2}))|n)" );
381
+ final match = regex.firstMatch (fbAlert.toString ())! ;
382
+ final fbGain = match.group (1 );
383
+ final fbLoss = match.group (2 );
384
+ for (final listedStock in _stockList) {
385
+ if (listedStock.acronym == acronym) {
386
+ if (fbGain != "n" ) {
387
+ listedStock.alertGain = double .tryParse (fbGain! );
388
+ }
389
+ if (fbLoss != "n" ) {
390
+ listedStock.alertLoss = double .tryParse (fbLoss! );
391
+ }
388
392
}
389
393
}
390
394
}
0 commit comments