You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title =NSLocalizedString("reader_drm_management_title", comment:"Title of the DRM management view")
36
-
reload()
37
-
}
34
+
weak varmoduleDelegate:ReaderModuleDelegate?
38
35
39
-
@IBActionfunc renewTapped(){
40
-
letalert=UIAlertController(
41
-
title:NSLocalizedString("reader_drm_renew_title", comment:"Title of the renew confirmation alert"),
42
-
message:NSLocalizedString("reader_drm_renew_message", comment:"Message of the renew confirmation alert"),
43
-
preferredStyle:.alert
44
-
)
45
-
letconfirmButton=UIAlertAction(title:NSLocalizedString("confirm_button", comment:"Confirmation button to renew a publication"), style:.default, handler:{ _ in
46
-
Task{
47
-
do{
48
-
tryawaitself.viewModel.renewLoan()
49
-
self.reload()
50
-
self.moduleDelegate?.presentAlert(
51
-
NSLocalizedString("success_title", comment:"Title for the success message after renewing a publication"),
52
-
message:NSLocalizedString("reader_drm_renew_success_message", comment:"Success message after renewing a publication"),
title =NSLocalizedString("reader_drm_management_title", comment:"Title of the DRM management view")
38
+
reload()
39
+
}
40
+
41
+
@IBActionfunc renewTapped(){
42
+
letalert=UIAlertController(
43
+
title:NSLocalizedString("reader_drm_renew_title", comment:"Title of the renew confirmation alert"),
44
+
message:NSLocalizedString("reader_drm_renew_message", comment:"Message of the renew confirmation alert"),
45
+
preferredStyle:.alert
46
+
)
47
+
letconfirmButton=UIAlertAction(title:NSLocalizedString("confirm_button", comment:"Confirmation button to renew a publication"), style:.default, handler:{ _ in
48
+
Task{
49
+
do{
50
+
tryawaitself.viewModel.renewLoan()
51
+
self.reload()
52
+
self.moduleDelegate?.presentAlert(
53
+
NSLocalizedString("success_title", comment:"Title for the success message after renewing a publication"),
54
+
message:NSLocalizedString("reader_drm_renew_success_message", comment:"Success message after renewing a publication"),
letdismissButton=UIAlertAction(title:NSLocalizedString("cancel_button", comment:"Cancel renewing the publication"), style:.cancel)
62
+
})
63
+
letdismissButton=UIAlertAction(title:NSLocalizedString("cancel_button", comment:"Cancel renewing the publication"), style:.cancel)
62
64
63
-
alert.addAction(dismissButton)
64
-
alert.addAction(confirmButton)
65
-
// Present alert.
66
-
present(alert, animated:true)
67
-
}
65
+
alert.addAction(dismissButton)
66
+
alert.addAction(confirmButton)
67
+
// Present alert.
68
+
present(alert, animated:true)
69
+
}
68
70
69
-
@IBActionfunc returnTapped(){
70
-
letalert=UIAlertController(
71
-
title:NSLocalizedString("reader_drm_return_title", comment:"Title of the return confirmation alert"),
72
-
message:NSLocalizedString("reader_drm_return_message", comment:"Message of the return confirmation alert"),
73
-
preferredStyle:.alert
74
-
)
75
-
letconfirmButton=UIAlertAction(title:NSLocalizedString("confirm_button", comment:"Confirmation button to return a publication"), style:.destructive, handler:{ _ in
title:NSLocalizedString("reader_drm_return_title", comment:"Title of the return confirmation alert"),
74
+
message:NSLocalizedString("reader_drm_return_message", comment:"Message of the return confirmation alert"),
75
+
preferredStyle:.alert
76
+
)
77
+
letconfirmButton=UIAlertAction(title:NSLocalizedString("confirm_button", comment:"Confirmation button to return a publication"), style:.destructive, handler:{ _ in
0 commit comments