зеркало из https://github.com/nextcloud/ios.git
This commit is contained in:
Родитель
ef5742dd70
Коммит
11f7c6f214
|
@ -487,25 +487,32 @@ class NCManageDatabase: NSObject {
|
|||
|
||||
let realm = try! Realm()
|
||||
|
||||
do {
|
||||
try realm.write {
|
||||
if realm.isInWriteTransaction {
|
||||
|
||||
print("[LOG] Could not write to database, addActivityClient is already in write transaction")
|
||||
|
||||
} else {
|
||||
|
||||
do {
|
||||
try realm.write {
|
||||
|
||||
// Add new Activity
|
||||
let addActivity = tableActivity()
|
||||
// Add new Activity
|
||||
let addActivity = tableActivity()
|
||||
|
||||
addActivity.account = tableAccount.account
|
||||
addActivity.action = action
|
||||
addActivity.file = file
|
||||
addActivity.fileID = fileID
|
||||
addActivity.note = noteReplacing
|
||||
addActivity.selector = selector
|
||||
addActivity.type = type
|
||||
addActivity.verbose = verbose
|
||||
addActivity.account = tableAccount.account
|
||||
addActivity.action = action
|
||||
addActivity.file = file
|
||||
addActivity.fileID = fileID
|
||||
addActivity.note = noteReplacing
|
||||
addActivity.selector = selector
|
||||
addActivity.type = type
|
||||
addActivity.verbose = verbose
|
||||
|
||||
realm.add(addActivity)
|
||||
realm.add(addActivity)
|
||||
}
|
||||
} catch let error {
|
||||
print("[LOG] Could not write to database: ", error)
|
||||
}
|
||||
} catch let error {
|
||||
print("[LOG] Could not write to database: ", error)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -482,29 +482,33 @@
|
|||
|
||||
- (void)sendMail:(XLFormRowDescriptor *)sender
|
||||
{
|
||||
// Email Subject
|
||||
NSString *emailTitle = NSLocalizedString(@"_information_req_", nil);
|
||||
// Email Content
|
||||
NSString *messageBody;
|
||||
// Email Recipents
|
||||
NSArray *toRecipents;
|
||||
if ([MFMailComposeViewController canSendMail]) {
|
||||
|
||||
// Email Subject
|
||||
NSString *emailTitle = NSLocalizedString(@"_information_req_", nil);
|
||||
// Email Content
|
||||
NSString *messageBody;
|
||||
// Email Recipents
|
||||
NSArray *toRecipents;
|
||||
|
||||
messageBody = [NSString stringWithFormat:@"\n\n\n%@ Version %@ (%@)", [NCBrandOptions sharedInstance].brand, [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"], [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]];
|
||||
toRecipents = [NSArray arrayWithObject:[NCBrandOptions sharedInstance].mailMe];
|
||||
messageBody = [NSString stringWithFormat:@"\n\n\n%@ Version %@ (%@)", [NCBrandOptions sharedInstance].brand, [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"], [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]];
|
||||
toRecipents = [NSArray arrayWithObject:[NCBrandOptions sharedInstance].mailMe];
|
||||
|
||||
MFMailComposeViewController *mc = [[MFMailComposeViewController alloc] init];
|
||||
mc.mailComposeDelegate = self;
|
||||
[mc setSubject:emailTitle];
|
||||
[mc setMessageBody:messageBody isHTML:NO];
|
||||
[mc setToRecipients:toRecipents];
|
||||
MFMailComposeViewController *mc = [[MFMailComposeViewController alloc] init];
|
||||
mc.mailComposeDelegate = self;
|
||||
[mc setSubject:emailTitle];
|
||||
[mc setMessageBody:messageBody isHTML:NO];
|
||||
[mc setToRecipients:toRecipents];
|
||||
|
||||
// Present mail view controller on screen
|
||||
// Present mail view controller on screen
|
||||
[self presentViewController:mc animated:YES completion:NULL];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)sendMailEncryptPass
|
||||
{
|
||||
[CCUtility sendMailEncryptPass:[CCUtility getEmail] validateEmail:NO form:self nameImage:@"backgroundDetail"];
|
||||
if ([MFMailComposeViewController canSendMail])
|
||||
[CCUtility sendMailEncryptPass:[CCUtility getEmail] validateEmail:NO form:self nameImage:@"backgroundDetail"];
|
||||
}
|
||||
|
||||
#pragma --------------------------------------------------------------------------------------------
|
||||
|
|
Загрузка…
Ссылка в новой задаче