Check team count if currentTeamId is set (#4781)

This commit is contained in:
Miguel Alatzar 2020-09-08 15:31:02 -07:00 committed by GitHub
parent 524609eb36
commit ef583d4fb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,7 +92,7 @@ class ShareViewController: SLComposeServiceViewController {
func loadData() {
if sessionToken == nil || serverURL == nil {
showErrorMessage(title: "", message: "Authentication required: Please first login using the app.", VC: self)
} else if store.getCurrentTeamId() == "" {
} else if store.getCurrentTeamId() == "" || store.getMyTeams().count == 0 {
showErrorMessage(title: "", message: "You must belong to a team before you can share files.", VC: self)
} else {
extractDataFromContext()