Skip to content

Commit

Permalink
Handle toast message call on nil UIView
Browse files Browse the repository at this point in the history
  • Loading branch information
jstorm31 committed Mar 15, 2021
1 parent 19f293b commit da0b3fc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Grades.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
OTHER_SWIFT_FLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = cz.cvut.fit.grades.NotificationExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -1659,7 +1659,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
OTHER_SWIFT_FLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = cz.cvut.fit.grades.NotificationExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -1690,7 +1690,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
OTHER_SWIFT_FLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = cz.cvut.fit.grades.NotificationExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -1847,7 +1847,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
OTHER_LDFLAGS = (
"$(inherited)",
"$(OTHER_LDFLAGS)",
Expand Down Expand Up @@ -1886,7 +1886,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
OTHER_LDFLAGS = (
"$(inherited)",
"$(OTHER_LDFLAGS)",
Expand Down Expand Up @@ -2039,7 +2039,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
OTHER_LDFLAGS = (
"$(inherited)",
"$(OTHER_LDFLAGS)",
Expand Down
6 changes: 5 additions & 1 deletion Grades/View/ViewController/LoginViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ class LoginViewController: BaseViewController, BindableType, ConfirmationModalPr
viewModel.authenticate(viewController: self)
.subscribeOn(MainScheduler.instance)
.subscribe(onError: { [weak self] error in
self?.view.makeCustomToast(error.localizedDescription, type: .danger)
Log.error(error.localizedDescription)

if let view = self?.view {
view.makeCustomToast(error.localizedDescription, type: .danger)
}
})
.disposed(by: bag)
}
Expand Down

0 comments on commit da0b3fc

Please sign in to comment.