mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-12 23:34:08 +02:00
Reset all analytics counters
This commit is contained in:
parent
50e39164bd
commit
679e126194
@ -195,7 +195,7 @@ private void FormBrowser_FormClosed(object sender, FormClosedEventArgs e){
|
||||
}
|
||||
|
||||
private void Config_MuteToggled(object sender, EventArgs e){
|
||||
AnalyticsFile.CountMuteNotifications.Trigger();
|
||||
AnalyticsFile.NotificationMutes.Trigger();
|
||||
}
|
||||
|
||||
private void Config_TrayBehaviorChanged(object sender, EventArgs e){
|
||||
@ -270,7 +270,7 @@ protected override void WndProc(ref Message m){
|
||||
}
|
||||
else{
|
||||
browser.OnMouseClickExtra(m.WParam);
|
||||
AnalyticsFile.CountBrowserExtraMouseButtons.Trigger();
|
||||
AnalyticsFile.BrowserExtraMouseButtons.Trigger();
|
||||
}
|
||||
|
||||
return;
|
||||
@ -295,7 +295,7 @@ public void ReinjectCustomCSS(string css){
|
||||
|
||||
public void ReloadToTweetDeck(){
|
||||
browser.ReloadToTweetDeck();
|
||||
AnalyticsFile.CountBrowserReloads.Trigger();
|
||||
AnalyticsFile.BrowserReloads.Trigger();
|
||||
}
|
||||
|
||||
public void TriggerTweetScreenshot(){
|
||||
@ -312,7 +312,7 @@ public void PlaySoundNotification(){
|
||||
|
||||
public void ApplyROT13(){
|
||||
browser.ApplyROT13();
|
||||
AnalyticsFile.CountUsedROT13.Trigger();
|
||||
AnalyticsFile.UsedROT13.Trigger();
|
||||
}
|
||||
|
||||
// callback handlers
|
||||
@ -383,21 +383,21 @@ public void OpenSettings(Type startTab){
|
||||
form.Dispose();
|
||||
};
|
||||
|
||||
AnalyticsFile.CountOpenOptions.Trigger();
|
||||
AnalyticsFile.OpenOptions.Trigger();
|
||||
ShowChildForm(form);
|
||||
}
|
||||
}
|
||||
|
||||
public void OpenAbout(){
|
||||
if (!FormManager.TryBringToFront<FormAbout>()){
|
||||
AnalyticsFile.CountOpenAbout.Trigger();
|
||||
AnalyticsFile.OpenAbout.Trigger();
|
||||
ShowChildForm(new FormAbout());
|
||||
}
|
||||
}
|
||||
|
||||
public void OpenPlugins(){
|
||||
if (!FormManager.TryBringToFront<FormPlugins>()){
|
||||
AnalyticsFile.CountOpenPlugins.Trigger();
|
||||
AnalyticsFile.OpenPlugins.Trigger();
|
||||
ShowChildForm(new FormPlugins(plugins));
|
||||
}
|
||||
}
|
||||
@ -409,7 +409,7 @@ public void OpenPlugins(){
|
||||
}
|
||||
|
||||
public void OnTweetSound(){
|
||||
AnalyticsFile.CountSoundNotifications.Trigger();
|
||||
AnalyticsFile.SoundNotifications.Trigger();
|
||||
}
|
||||
|
||||
public void PlayVideo(string url, string username){
|
||||
@ -427,7 +427,7 @@ public void PlayVideo(string url, string username){
|
||||
}
|
||||
|
||||
videoPlayer.Launch(url, username);
|
||||
AnalyticsFile.CountVideoPlays.Trigger();
|
||||
AnalyticsFile.VideoPlays.Trigger();
|
||||
}
|
||||
|
||||
public bool ProcessBrowserKey(Keys key){
|
||||
@ -449,7 +449,7 @@ public void ShowTweetDetail(string columnId, string chirpId, string fallbackUrl)
|
||||
|
||||
notification.FinishCurrentNotification();
|
||||
browser.ShowTweetDetail(columnId, chirpId, fallbackUrl);
|
||||
AnalyticsFile.CountTweetDetails.Trigger();
|
||||
AnalyticsFile.TweetDetails.Trigger();
|
||||
}
|
||||
|
||||
public void OnTweetScreenshotReady(string html, int width, int height){
|
||||
@ -458,7 +458,7 @@ public void OnTweetScreenshotReady(string html, int width, int height){
|
||||
}
|
||||
|
||||
notificationScreenshotManager.Trigger(html, width, height);
|
||||
AnalyticsFile.CountTweetScreenshots.Trigger();
|
||||
AnalyticsFile.TweetScreenshots.Trigger();
|
||||
}
|
||||
|
||||
public void DisplayTooltip(string text){
|
||||
|
@ -118,7 +118,7 @@ public virtual bool OnContextMenuCommand(IWebBrowser browserControl, IBrowser br
|
||||
case MenuCopyUsername:
|
||||
Match match = TwitterUtils.RegexAccount.Match(parameters.UnfilteredLinkUrl);
|
||||
SetClipboardText(control, match.Success ? match.Groups[1].Value : parameters.UnfilteredLinkUrl);
|
||||
control.InvokeAsyncSafe(analytics.AnalyticsFile.CountCopiedUsernames.Trigger);
|
||||
control.InvokeAsyncSafe(analytics.AnalyticsFile.CopiedUsernames.Trigger);
|
||||
break;
|
||||
|
||||
case MenuOpenMediaUrl:
|
||||
@ -148,7 +148,7 @@ void ViewFile(){
|
||||
ViewFile();
|
||||
}
|
||||
else{
|
||||
control.InvokeAsyncSafe(analytics.AnalyticsFile.CountViewedImages.Trigger);
|
||||
control.InvokeAsyncSafe(analytics.AnalyticsFile.ViewedImages.Trigger);
|
||||
|
||||
BrowserUtils.DownloadFileAsync(TwitterUtils.GetMediaLink(url, ImageQuality), file, ViewFile, ex => {
|
||||
FormMessage.Error("Image Download", "An error occurred while downloading the image: "+ex.Message, FormMessage.OK);
|
||||
@ -159,18 +159,18 @@ void ViewFile(){
|
||||
|
||||
case MenuSaveMedia:
|
||||
if (IsVideo){
|
||||
control.InvokeAsyncSafe(analytics.AnalyticsFile.CountDownloadedVideos.Trigger);
|
||||
control.InvokeAsyncSafe(analytics.AnalyticsFile.DownloadedVideos.Trigger);
|
||||
TwitterUtils.DownloadVideo(GetMediaLink(parameters), lastHighlightedTweetAuthors.LastOrDefault());
|
||||
}
|
||||
else{
|
||||
control.InvokeAsyncSafe(analytics.AnalyticsFile.CountDownloadedImages.Trigger);
|
||||
control.InvokeAsyncSafe(analytics.AnalyticsFile.DownloadedImages.Trigger);
|
||||
TwitterUtils.DownloadImage(GetMediaLink(parameters), lastHighlightedTweetAuthors.LastOrDefault(), ImageQuality);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case MenuSaveTweetImages:
|
||||
control.InvokeAsyncSafe(analytics.AnalyticsFile.CountDownloadedImages.Trigger);
|
||||
control.InvokeAsyncSafe(analytics.AnalyticsFile.DownloadedImages.Trigger);
|
||||
TwitterUtils.DownloadImages(lastHighlightedTweetImageList, lastHighlightedTweetAuthors.LastOrDefault(), ImageQuality);
|
||||
break;
|
||||
|
||||
|
@ -96,7 +96,7 @@ public override void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser br
|
||||
|
||||
RemoveSeparatorIfLast(model);
|
||||
|
||||
form.InvokeAsyncSafe(form.AnalyticsFile.CountBrowserContextMenus.Trigger);
|
||||
form.InvokeAsyncSafe(form.AnalyticsFile.BrowserContextMenus.Trigger);
|
||||
}
|
||||
|
||||
public override bool OnContextMenuCommand(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, CefMenuCommand commandId, CefEventFlags eventFlags){
|
||||
@ -165,7 +165,7 @@ public static ContextMenu CreateMenu(FormBrowser form){
|
||||
|
||||
menu.Popup += (sender, args) => {
|
||||
menu.MenuItems[1].Checked = Program.UserConfig.MuteNotifications;
|
||||
form.AnalyticsFile.CountBrowserContextMenus.Trigger();
|
||||
form.AnalyticsFile.BrowserContextMenus.Trigger();
|
||||
};
|
||||
|
||||
return menu;
|
||||
|
@ -56,7 +56,7 @@ public override void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser br
|
||||
|
||||
form.InvokeAsyncSafe(() => {
|
||||
form.ContextMenuOpen = true;
|
||||
form.AnalyticsFile.CountNotificationContextMenus.Trigger();
|
||||
form.AnalyticsFile.NotificationContextMenus.Trigger();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ public KeyboardHandlerNotification(FormNotificationBase notification){
|
||||
}
|
||||
|
||||
private void TriggerKeyboardShortcutAnalytics(){
|
||||
notification.InvokeAsyncSafe(notification.AnalyticsFile.CountNotificationKeyboardShortcuts.Trigger);
|
||||
notification.InvokeAsyncSafe(notification.AnalyticsFile.NotificationKeyboardShortcuts.Trigger);
|
||||
}
|
||||
|
||||
bool IKeyboardHandler.OnPreKeyEvent(IWebBrowser browserControl, IBrowser browser, KeyType type, int windowsKeyCode, int nativeKeyCode, CefEventFlags modifiers, bool isSystemKey, ref bool isKeyboardShortcut){
|
||||
|
@ -83,7 +83,7 @@ private void currentPipe_DataIn(object sender, DuplexPipe.PipeReadEventArgs e){
|
||||
break;
|
||||
|
||||
case "download":
|
||||
owner.AnalyticsFile.CountDownloadedVideos.Trigger();
|
||||
owner.AnalyticsFile.DownloadedVideos.Trigger();
|
||||
TwitterUtils.DownloadVideo(lastUrl, lastUsername);
|
||||
break;
|
||||
|
||||
|
@ -127,7 +127,7 @@ private IntPtr MouseHookProc(int nCode, IntPtr wParam, IntPtr lParam){
|
||||
}
|
||||
|
||||
blockXButtonUp = true;
|
||||
this.InvokeAsyncSafe(AnalyticsFile.CountNotificationExtraMouseButtons.Trigger);
|
||||
this.InvokeAsyncSafe(AnalyticsFile.NotificationExtraMouseButtons.Trigger);
|
||||
return NativeMethods.HOOK_HANDLED;
|
||||
}
|
||||
else if (eventType == NativeMethods.WM_XBUTTONUP && blockXButtonUp){
|
||||
|
@ -93,7 +93,7 @@ public override void ShowNotification(TweetNotification notification){
|
||||
}
|
||||
|
||||
needsTrim |= tweetQueue.Count >= TrimMinimum;
|
||||
AnalyticsFile.CountDesktopNotifications.Trigger();
|
||||
AnalyticsFile.DesktopNotifications.Trigger();
|
||||
}
|
||||
|
||||
public override void HideNotification(){
|
||||
|
@ -31,31 +31,31 @@ static AnalyticsFile(){
|
||||
|
||||
// USAGE DATA
|
||||
|
||||
public Counter CountOpenOptions { get; private set; } = 0;
|
||||
public Counter CountOpenPlugins { get; private set; } = 0;
|
||||
public Counter CountOpenAbout { get; private set; } = 0;
|
||||
public Counter CountOpenGuide { get; private set; } = 0;
|
||||
public Counter OpenOptions { get; private set; } = 0;
|
||||
public Counter OpenPlugins { get; private set; } = 0;
|
||||
public Counter OpenAbout { get; private set; } = 0;
|
||||
public Counter OpenGuide { get; private set; } = 0;
|
||||
|
||||
public Counter CountDesktopNotifications { get; private set; } = 0;
|
||||
public Counter CountSoundNotifications { get; private set; } = 0;
|
||||
public Counter CountMuteNotifications { get; private set; } = 0;
|
||||
public Counter DesktopNotifications { get; private set; } = 0;
|
||||
public Counter SoundNotifications { get; private set; } = 0;
|
||||
public Counter NotificationMutes { get; private set; } = 0;
|
||||
|
||||
public Counter CountBrowserContextMenus { get; private set; } = 0;
|
||||
public Counter CountBrowserExtraMouseButtons { get; private set; } = 0;
|
||||
public Counter CountNotificationContextMenus { get; private set; } = 0;
|
||||
public Counter CountNotificationExtraMouseButtons { get; private set; } = 0;
|
||||
public Counter CountNotificationKeyboardShortcuts { get; private set; } = 0;
|
||||
public Counter BrowserContextMenus { get; private set; } = 0;
|
||||
public Counter BrowserExtraMouseButtons { get; private set; } = 0;
|
||||
public Counter NotificationContextMenus { get; private set; } = 0;
|
||||
public Counter NotificationExtraMouseButtons { get; private set; } = 0;
|
||||
public Counter NotificationKeyboardShortcuts { get; private set; } = 0;
|
||||
|
||||
public Counter CountBrowserReloads { get; private set; } = 0;
|
||||
public Counter CountCopiedUsernames { get; private set; } = 0;
|
||||
public Counter CountViewedImages { get; private set; } = 0;
|
||||
public Counter CountDownloadedImages { get; private set; } = 0;
|
||||
public Counter CountDownloadedVideos { get; private set; } = 0;
|
||||
public Counter CountUsedROT13 { get; private set; } = 0;
|
||||
public Counter BrowserReloads { get; private set; } = 0;
|
||||
public Counter CopiedUsernames { get; private set; } = 0;
|
||||
public Counter ViewedImages { get; private set; } = 0;
|
||||
public Counter DownloadedImages { get; private set; } = 0;
|
||||
public Counter DownloadedVideos { get; private set; } = 0;
|
||||
public Counter UsedROT13 { get; private set; } = 0;
|
||||
|
||||
public Counter CountTweetScreenshots { get; private set; } = 0;
|
||||
public Counter CountTweetDetails { get; private set; } = 0;
|
||||
public Counter CountVideoPlays { get; private set; } = 0;
|
||||
public Counter TweetScreenshots { get; private set; } = 0;
|
||||
public Counter TweetDetails { get; private set; } = 0;
|
||||
public Counter VideoPlays { get; private set; } = 0;
|
||||
|
||||
// END OF DATA
|
||||
|
||||
|
@ -97,27 +97,27 @@ public static AnalyticsReport Create(AnalyticsFile file, ExternalInfo info, Plug
|
||||
{ "Reply Account Mode" , ReplyAccountConfigFromPlugin },
|
||||
{ "Template Count" , Exact(TemplateCountFromPlugin) },
|
||||
0,
|
||||
{ "Opened Options" , LogRound(file.CountOpenOptions, 4) },
|
||||
{ "Opened Plugins" , LogRound(file.CountOpenPlugins, 4) },
|
||||
{ "Opened About" , LogRound(file.CountOpenAbout, 4) },
|
||||
{ "Opened Guide" , LogRound(file.CountOpenGuide, 4) },
|
||||
{ "Desktop Notifications" , LogRound(file.CountDesktopNotifications, 5) },
|
||||
{ "Sound Notifications" , LogRound(file.CountSoundNotifications, 5) },
|
||||
{ "Mute Notifications" , LogRound(file.CountMuteNotifications, 2) },
|
||||
{ "Browser Context Menus" , LogRound(file.CountBrowserContextMenus, 2) },
|
||||
{ "Browser Extra Mouse Buttons" , LogRound(file.CountBrowserExtraMouseButtons, 2) },
|
||||
{ "Notification Context Menus" , LogRound(file.CountNotificationContextMenus, 2) },
|
||||
{ "Notification Extra Mouse Buttons" , LogRound(file.CountNotificationExtraMouseButtons, 2) },
|
||||
{ "Notification Keyboard Shortcuts" , LogRound(file.CountNotificationKeyboardShortcuts, 2) },
|
||||
{ "Browser Reloads" , LogRound(file.CountBrowserReloads, 2) },
|
||||
{ "Copied Usernames" , LogRound(file.CountCopiedUsernames, 2) },
|
||||
{ "Viewed Images" , LogRound(file.CountViewedImages, 2) },
|
||||
{ "Downloaded Images" , LogRound(file.CountDownloadedImages, 2) },
|
||||
{ "Downloaded Videos" , LogRound(file.CountDownloadedVideos, 2) },
|
||||
{ "Used ROT13" , LogRound(file.CountUsedROT13, 2) },
|
||||
{ "Tweet Screenshots" , LogRound(file.CountTweetScreenshots, 2) },
|
||||
{ "Tweet Details" , LogRound(file.CountTweetDetails, 2) },
|
||||
{ "Video Plays" , LogRound(file.CountVideoPlays, 4) }
|
||||
{ "Opened Options" , LogRound(file.OpenOptions, 4) },
|
||||
{ "Opened Plugins" , LogRound(file.OpenPlugins, 4) },
|
||||
{ "Opened About" , LogRound(file.OpenAbout, 4) },
|
||||
{ "Opened Guide" , LogRound(file.OpenGuide, 4) },
|
||||
{ "Desktop Notifications" , LogRound(file.DesktopNotifications, 5) },
|
||||
{ "Sound Notifications" , LogRound(file.SoundNotifications, 5) },
|
||||
{ "Notification Mutes" , LogRound(file.NotificationMutes, 2) },
|
||||
{ "Browser Context Menus" , LogRound(file.BrowserContextMenus, 2) },
|
||||
{ "Browser Extra Mouse Buttons" , LogRound(file.BrowserExtraMouseButtons, 2) },
|
||||
{ "Notification Context Menus" , LogRound(file.NotificationContextMenus, 2) },
|
||||
{ "Notification Extra Mouse Buttons" , LogRound(file.NotificationExtraMouseButtons, 2) },
|
||||
{ "Notification Keyboard Shortcuts" , LogRound(file.NotificationKeyboardShortcuts, 2) },
|
||||
{ "Browser Reloads" , LogRound(file.BrowserReloads, 2) },
|
||||
{ "Copied Usernames" , LogRound(file.CopiedUsernames, 2) },
|
||||
{ "Viewed Images" , LogRound(file.ViewedImages, 2) },
|
||||
{ "Downloaded Images" , LogRound(file.DownloadedImages, 2) },
|
||||
{ "Downloaded Videos" , LogRound(file.DownloadedVideos, 2) },
|
||||
{ "Used ROT13" , LogRound(file.UsedROT13, 2) },
|
||||
{ "Tweet Screenshots" , LogRound(file.TweetScreenshots, 2) },
|
||||
{ "Tweet Details" , LogRound(file.TweetDetails, 2) },
|
||||
{ "Video Plays" , LogRound(file.VideoPlays, 4) }
|
||||
}.FinalizeReport();
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ public static void Show(string hash = null){
|
||||
FormBrowser owner = FormManager.TryFind<FormBrowser>();
|
||||
|
||||
if (owner != null){
|
||||
owner.AnalyticsFile.CountOpenGuide.Trigger();
|
||||
owner.AnalyticsFile.OpenGuide.Trigger();
|
||||
new FormGuide(url, owner).Show(owner);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user