Commit 9aef849f authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Anthony Léonard

account: fix clear history

Clear history button does not remove all conversations. This patch
fix it by clearing recording model as well as history model. Also
now LocalTextRecordingCollections are loaded before any UI is present
to ensure they are created only once, and app won't crash when clearing
collections.

Change-Id: I8fcfd72c41a76b13c4197c8cc3f1747c2be66d48
Reviewed-by: default avatarAnthony Léonard <anthony.leonard@savoirfairelinux.com>
parent c14b5843
......@@ -31,6 +31,7 @@
#import <profile.h>
#import <person.h>
#import <globalinstances.h>
#import <media/recordingmodel.h>
#if ENABLE_SPARKLE
#import <Sparkle/Sparkle.h>
......@@ -101,6 +102,7 @@
- (IBAction)clearHistory:(id)sender {
CategorizedHistoryModel::instance().clearAllCollections();
Media::RecordingModel::instance().clearAllCollections();
[historyChangedLabel setHidden:NO];
}
......
......@@ -37,6 +37,7 @@
#import <numbercategorymodel.h>
#import <callmodel.h>
#import <profilemodel.h>
#import <media/recordingmodel.h>
#import "backends/AddressBookBackend.h"
#import "delegates/ImageManipulationDelegate.h"
......@@ -85,6 +86,7 @@ int main(int argc, const char *argv[]) {
ProfileModel::instance().addCollection<LocalProfileCollection>(LoadOptions::FORCE_ENABLED);
PersonModel::instance().addCollection<PeerProfileCollection>(LoadOptions::FORCE_ENABLED);
Media::RecordingModel::instance();
return NSApplicationMain(argc, argv);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment