@@ -45,6 +45,8 @@ public partial class MainViewModel : ObservableObject
readonly Leftovers leftovers ;
readonly Leftovers leftovers ;
readonly Submissions submissions ;
readonly Submissions submissions ;
RunReport lastRun ;
RunReport lastRun ;
int checks ;
bool sent ;
bool revealing ;
bool revealing ;
bool instant ;
bool instant ;
@@ -198,15 +200,20 @@ public partial class MainViewModel : ObservableObject
HistoryCleared = false ;
HistoryCleared = false ;
AskReach = false ;
AskReach = false ;
OfferShare = false ;
OfferShare = false ;
sent = false ;
ShareResult = null ;
ShareResult = null ;
var generation = + + checks ;
foreach ( var card in Cards ) card . Finding = card . Id = = CheckId . Reach ? null : Finding . Running ( card . Id ) ;
foreach ( var card in Cards ) card . Finding = card . Id = = CheckId . Reach ? null : Finding . Running ( card . Id ) ;
Uses . Clear ( ) ;
Uses . Clear ( ) ;
ResetPath ( platform . Device ) ;
ResetPath ( platform . Device ) ;
try
try
{
{
lastRun = await runner . Run ( ( finding , run ) = > Dispatcher . UIThread . Post ( ( ) = > Apply ( finding , run ) ) , ct ) ;
lastRun = await runner . Run ( ( finding , run ) = > Dispatcher . UIThread . Post ( ( ) = >
{
if ( generation = = checks ) Apply ( finding , run ) ;
} ) , ct ) ;
ShowUses ( lastRun ) ;
ShowUses ( lastRun ) ;
OfferShare = true ;
OfferShare = lastRun . Stun ? . Ports ? . LifetimeDone ! = false ;
OnPropertyChanged ( nameof ( CanOpenPorts ) ) ;
OnPropertyChanged ( nameof ( CanOpenPorts ) ) ;
AskReach = lastRun . PublicV4 is not null | | lastRun . PublicV6 is not null ;
AskReach = lastRun . PublicV4 is not null | | lastRun . PublicV6 is not null ;
if ( ! AskReach ) SettleReach ( null ) ;
if ( ! AskReach ) SettleReach ( null ) ;
@@ -296,6 +303,7 @@ public partial class MainViewModel : ObservableObject
Shared . Add ( new SubmissionViewModel ( submission , Unshare ) ) ;
Shared . Add ( new SubmissionViewModel ( submission , Unshare ) ) ;
OnPropertyChanged ( nameof ( ShowShared ) ) ;
OnPropertyChanged ( nameof ( ShowShared ) ) ;
ShareResult = Localizer . Instance . Format ( "ShareSent" , shared . Id , Texts . Date ( shared . KeepUntil ) ) ;
ShareResult = Localizer . Instance . Format ( "ShareSent" , shared . Id , Texts . Date ( shared . KeepUntil ) ) ;
sent = true ;
OfferShare = false ;
OfferShare = false ;
}
}
finally
finally
@@ -474,6 +482,7 @@ public partial class MainViewModel : ObservableObject
var ports = run . Stun ? . Ports ;
var ports = run . Stun ? . Ports ;
if ( exit is not null & & run . Nat = = NatKind . Shared & & run . PublicV4 is not null & & ports ? . Pattern is PortPattern . InOrder or PortPattern . Block )
if ( exit is not null & & run . Nat = = NatKind . Shared & & run . PublicV4 is not null & & ports ? . Pattern is PortPattern . InOrder or PortPattern . Block )
exit . Details = Lines ( Address ( $"{run.PublicV4}:{ports.Low}– {ports.High}" ) ) ;
exit . Details = Lines ( Address ( $"{run.PublicV4}:{ports.Low}– {ports.High}" ) ) ;
if ( ports ? . LifetimeDone = = true & & run = = lastRun & & ! IsChecking & & ! sent ) OfferShare = true ;
break ;
break ;
case CheckId . Addresses :
case CheckId . Addresses :
var internet = Node ( NodeRole . Internet ) ;
var internet = Node ( NodeRole . Internet ) ;