mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-08-15 05:16:59 +02:00
Replace FormNotificationBase.ChirpId with CanViewDetail that checks ColumnId too
This commit is contained in:
Core
@@ -29,7 +29,7 @@ namespace TweetDuck.Core.Handling{
|
|||||||
base.OnBeforeContextMenu(browserControl, browser, frame, parameters, model);
|
base.OnBeforeContextMenu(browserControl, browser, frame, parameters, model);
|
||||||
|
|
||||||
if (enableCustomMenu){
|
if (enableCustomMenu){
|
||||||
if (!string.IsNullOrEmpty(form.CurrentChirpId)){
|
if (form.CanViewDetail){
|
||||||
model.AddItem(MenuViewDetail, "View detail");
|
model.AddItem(MenuViewDetail, "View detail");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -82,9 +82,10 @@ namespace TweetDuck.Core.Notification{
|
|||||||
private TweetNotification currentNotification;
|
private TweetNotification currentNotification;
|
||||||
private int pauseCounter;
|
private int pauseCounter;
|
||||||
|
|
||||||
public string CurrentChirpId => currentNotification?.ChirpId;
|
|
||||||
public string CurrentTweetUrl => currentNotification?.TweetUrl;
|
public string CurrentTweetUrl => currentNotification?.TweetUrl;
|
||||||
public string CurrentQuoteUrl => currentNotification?.QuoteUrl;
|
public string CurrentQuoteUrl => currentNotification?.QuoteUrl;
|
||||||
|
|
||||||
|
public bool CanViewDetail => currentNotification != null && !string.IsNullOrEmpty(currentNotification.ColumnId) && !string.IsNullOrEmpty(currentNotification.ChirpId);
|
||||||
public bool IsPaused => pauseCounter > 0;
|
public bool IsPaused => pauseCounter > 0;
|
||||||
|
|
||||||
public bool FreezeTimer { get; set; }
|
public bool FreezeTimer { get; set; }
|
||||||
|
Reference in New Issue
Block a user