File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
src/LinkDotNet.Blog.Web/Features/Services Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -62,8 +62,7 @@ private async ValueTask GetAndStoreUserRecordAsync()
62
62
63
63
private async ValueTask < int > GetIdentifierHashAsync ( )
64
64
{
65
- var hasKey = await TryGetKey ( ) ;
66
- if ( hasKey )
65
+ if ( await TryGetKey ( ) )
67
66
{
68
67
var key = await localStorageService . GetItemAsync < Guid > ( "user" ) ;
69
68
return key . GetHashCode ( ) ;
@@ -74,12 +73,11 @@ private async ValueTask<int> GetIdentifierHashAsync()
74
73
return id . GetHashCode ( ) ;
75
74
}
76
75
77
- private async Task < bool > TryGetKey ( )
76
+ private async ValueTask < bool > TryGetKey ( )
78
77
{
79
78
try
80
79
{
81
- var hasKey = await localStorageService . ContainKeyAsync ( "user" ) ;
82
- return hasKey ;
80
+ return await localStorageService . ContainKeyAsync ( "user" ) ;
83
81
}
84
82
catch ( Exception e )
85
83
{
@@ -100,4 +98,4 @@ private string GetClickedUrl()
100
98
var queryIndex = basePath . IndexOf ( '?' ) ;
101
99
return queryIndex >= 0 ? basePath [ ..queryIndex ] : basePath ;
102
100
}
103
- }
101
+ }
You can’t perform that action at this time.
0 commit comments