From aa8da7ab709f779f420659f28e27671cea74e479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 18 Aug 2024 17:53:30 +0200 Subject: [PATCH] Show placeholder view when there are no banned users MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- NextcloudTalk/BannedActorTableViewController.swift | 4 +++- NextcloudTalk/en.lproj/Localizable.strings | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NextcloudTalk/BannedActorTableViewController.swift b/NextcloudTalk/BannedActorTableViewController.swift index d54594913..481583647 100644 --- a/NextcloudTalk/BannedActorTableViewController.swift +++ b/NextcloudTalk/BannedActorTableViewController.swift @@ -41,8 +41,9 @@ self.tableView.register(UINib(nibName: bannedActorCellIdentifier, bundle: nil), forCellReuseIdentifier: bannedActorCellIdentifier) self.tableView.backgroundView = backgroundView - // We only want the loadingView, so always hide the placeholder self.backgroundView.placeholderView.isHidden = true + self.backgroundView.placeholderTextView.text = NSLocalizedString("No banned users or guests", comment: "") + self.backgroundView.setImage(UIImage(systemName: "person.badge.minus")) self.backgroundView.loadingView.startAnimating() self.modifyingViewIndicator.color = NCAppBranding.themeTextColor() @@ -62,6 +63,7 @@ self.backgroundView.loadingView.stopAnimating() self.backgroundView.loadingView.isHidden = true + self.backgroundView.placeholderView.isHidden = !self.bannedActors.isEmpty self.tableView.reloadData() self.hideActivityIndicator() diff --git a/NextcloudTalk/en.lproj/Localizable.strings b/NextcloudTalk/en.lproj/Localizable.strings index 6f2107a29..b3847060f 100644 --- a/NextcloudTalk/en.lproj/Localizable.strings +++ b/NextcloudTalk/en.lproj/Localizable.strings @@ -1174,6 +1174,9 @@ /* No comment provided by engineer. */ "No actions available" = "No actions available"; +/* No comment provided by engineer. */ +"No banned users or guests" = "No banned users or guests"; + /* No comment provided by engineer. */ "No description provided" = "No description provided";