private void displayStatus(UserStatus status, UserActivity activity = null) { if (status != null) { // Set status message based on activity (if we have one) and status is not offline if (activity != null && !(status is UserStatusOffline)) { statusMessage.Text = activity.Status; statusIcon.FadeColour(activity.GetAppropriateColour(colours), 500, Easing.OutQuint); return; } // Otherwise use only status lastVisitMessage.FadeTo(status is UserStatusOffline && User.LastVisit.HasValue ? 1 : 0); statusMessage.Text = status.Message; statusIcon.FadeColour(status.GetAppropriateColour(colours), 500, Easing.OutQuint); return; } // Fallback to web status if local one is null if (User.IsOnline) { Status.Value = new UserStatusOnline(); return; } Status.Value = new UserStatusOffline(); }