File tree 1 file changed +14
-4
lines changed
1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -741,6 +741,10 @@ void User::logout() const
741
741
742
742
QString User::name () const
743
743
{
744
+ if (isPublicShareLink ()) {
745
+ return tr (" Public Link" );
746
+ }
747
+
744
748
// If davDisplayName is empty (can be several reasons, simplest is missing login at startup), fall back to username
745
749
QString name = _account->account ()->davDisplayName ();
746
750
if (name == " " ) {
@@ -751,12 +755,18 @@ QString User::name() const
751
755
752
756
QString User::server (bool shortened) const
753
757
{
754
- QString serverUrl = _account->account ()->url ().toString ();
758
+ auto serverUrl = _account->account ()->url ();
759
+
760
+ if (isPublicShareLink ()) {
761
+ serverUrl.setUserName ({});
762
+ }
763
+ QString stringServerUrl = serverUrl.toString ();
755
764
if (shortened) {
756
- serverUrl.replace (QLatin1String (" https://" ), QLatin1String (" " ));
757
- serverUrl.replace (QLatin1String (" http://" ), QLatin1String (" " ));
765
+ stringServerUrl.replace (QLatin1String (" https://" ), QLatin1String (" " ));
766
+ stringServerUrl.replace (QLatin1String (" http://" ), QLatin1String (" " ));
767
+
758
768
}
759
- return serverUrl ;
769
+ return stringServerUrl ;
760
770
}
761
771
762
772
UserStatus::OnlineStatus User::status () const
You can’t perform that action at this time.
0 commit comments