DTR entry: Hide --- separator if list is empty (#63)
This commit is contained in:
		| @@ -119,8 +119,19 @@ public sealed class DtrEntry : IDisposable, IHostedService | |||||||
|         string tooltip; |         string tooltip; | ||||||
|         if (_apiController.IsConnected) |         if (_apiController.IsConnected) | ||||||
|         { |         { | ||||||
|             text = $"\uE044 {_pairManager.GetVisibleUserCount()}"; |             var pairCount = _pairManager.GetVisibleUserCount(); | ||||||
|             tooltip = $"Mare Synchronos: Connected{Environment.NewLine}----------{Environment.NewLine}{string.Join(Environment.NewLine, _pairManager.GetOnlineUserPairs().Where(x => x.IsVisible).Select(x => string.Format("{0} ({1})", x.PlayerName, x.UserData.AliasOrUID)))}"; |             text = $"\uE044 {pairCount}"; | ||||||
|  |             if (pairCount > 0) | ||||||
|  |             { | ||||||
|  |                 var visiblePairs = _pairManager.GetOnlineUserPairs() | ||||||
|  |                     .Where(x => x.IsVisible) | ||||||
|  |                     .Select(x => string.Format("{0} ({1})", x.PlayerName, x.UserData.AliasOrUID)); | ||||||
|  |                 tooltip = $"Mare Synchronos: Connected{Environment.NewLine}----------{Environment.NewLine}{string.Join(Environment.NewLine, visiblePairs)}"; | ||||||
|  |             } | ||||||
|  |             else | ||||||
|  |             { | ||||||
|  |                 tooltip = "Mare Synchronos: Connected"; | ||||||
|  |             } | ||||||
|         } |         } | ||||||
|         else |         else | ||||||
|         { |         { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 N. Lo
					N. Lo