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 @@ -716,6 +716,10 @@ void User::logout() const
716
716
717
717
QString User::name () const
718
718
{
719
+ if (isPublicShareLink ()) {
720
+ return tr (" Public Link" );
721
+ }
722
+
719
723
// If davDisplayName is empty (can be several reasons, simplest is missing login at startup), fall back to username
720
724
QString name = _account->account ()->davDisplayName ();
721
725
if (name == " " ) {
@@ -726,12 +730,18 @@ QString User::name() const
726
730
727
731
QString User::server (bool shortened) const
728
732
{
729
- QString serverUrl = _account->account ()->url ().toString ();
733
+ auto serverUrl = _account->account ()->url ();
734
+
735
+ if (isPublicShareLink ()) {
736
+ serverUrl.setUserName ({});
737
+ }
738
+ QString stringServerUrl = serverUrl.toString ();
730
739
if (shortened) {
731
- serverUrl.replace (QLatin1String (" https://" ), QLatin1String (" " ));
732
- serverUrl.replace (QLatin1String (" http://" ), QLatin1String (" " ));
740
+ stringServerUrl.replace (QLatin1String (" https://" ), QLatin1String (" " ));
741
+ stringServerUrl.replace (QLatin1String (" http://" ), QLatin1String (" " ));
742
+
733
743
}
734
- return serverUrl ;
744
+ return stringServerUrl ;
735
745
}
736
746
737
747
UserStatus::OnlineStatus User::status () const
You can’t perform that action at this time.
0 commit comments