.class public final Ldev/maelstrom/ykit/DashboardDeclutterShim;
.super Ljava/lang/Object;
.source "SourceFile"

# static fields
.field private static cachedBlocks:Ljava/util/List; # List<String uniqueId>

# direct methods
.method public static final filterObject(Lcom/tumblr/rumblr/model/TimelineObject;)Lcom/tumblr/rumblr/model/TimelineObject;
    .locals 3

    # Get the Timelineable object
    invoke-virtual {p0}, Lcom/tumblr/rumblr/model/TimelineObject;->getData()Lcom/tumblr/rumblr/model/Timelineable;
    move-result-object v0

    # Get the timelineable's type
    invoke-interface {v0}, Lcom/tumblr/rumblr/model/Timelineable;->getTimelineObjectType()Lcom/tumblr/rumblr/model/TimelineObjectType;
    move-result-object v0
    invoke-virtual {v0}, Ljava/lang/Enum;->name()Ljava/lang/String;
    move-result-object v0

    # Check if the timeline's type has been blocked
    sget-boolean v1, Ldev/maelstrom/ykit/settings/YkitCurrentSettings;->blockAdsEnabled:Z
    if-eqz v1, :skip_blockAds

    invoke-static {v0}, Ldev/maelstrom/ykit/DashboardDeclutterShim;->isAd(Ljava/lang/String;)Z
    move-result v1
    if-nez v1, :returnNull
    
    :skip_blockAds

    sget-boolean v1, Ldev/maelstrom/ykit/settings/YkitCurrentSettings;->reduceDashboardClutterEnabled:Z
    if-eqz v1, :skip_reduceDashboardClutter

    const-string v2, "TITLE"
    invoke-virtual {v0, v2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :returnNull

    const-string v2, "FOLLOWED_TAG_CAROUSEL_CARD" # Check these out
    invoke-virtual {v0, v2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :returnNull

    const-string v2, "VIDEO_HUB_FEATURED" # Tumblr TV
    invoke-virtual {v0, v2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :returnNull

    const-string v2, "VIDEO_HUB_FEATURED_BORDERED"
    invoke-virtual {v0, v2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :returnNull

    const-string v2, "TAG_CARDS_ROW"
    invoke-virtual {v0, v2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :returnNull

    const-string v2, "TAG_CARDS_COLLECTION"
    invoke-virtual {v0, v2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :returnNull

    const-string v2, "TAG_CAROUSEL_CARD"
    invoke-virtual {v0, v2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :returnNull

    const-string v2, "BLOG_CARD"
    invoke-virtual {v0, v2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :returnNull

    const-string v2, "BLOG_ROW"
    invoke-virtual {v0, v2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :returnNull
    
    :skip_reduceDashboardClutter

    sget-boolean v1, Ldev/maelstrom/ykit/settings/YkitCurrentSettings;->hideBlazedPosts:Z
    if-eqz v1, :skip_hideBlazedPosts

    const-string v2, "BLAZED_POST"
    invoke-virtual {v0, v2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :returnNull

    :skip_hideBlazedPosts

    goto :returnNormal
    :returnNull
    const p0, 0x0
    :returnNormal
    return-object p0
.end method

.method public static final isAd(Ljava/lang/String;)Z
    .locals 2

    const-string v0, "CLIENT_SIDE_MEDIATION"
    invoke-virtual {p0, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :returnTrue

    const-string v0, "CLIENT_SIDE_AD"
    invoke-virtual {p0, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :returnTrue

    const-string v0, "GEMINI_AD"
    invoke-virtual {p0, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :returnTrue

    const-string v0, "NIMBUS_AD"
    invoke-virtual {p0, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :returnTrue

    const-string v0, "DISPLAY_IO_INTERSCROLLER_AD"
    invoke-virtual {p0, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :returnTrue

    const-string v0, "DISPLAY_IO_HEADLINE_VIDEO_AD"
    invoke-virtual {p0, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :returnTrue

    const-string v0, "FACEBOOK_BIDDAABLE"
    invoke-virtual {p0, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :returnTrue

    const-string v0, "GOOGLE_NATIVE"
    invoke-virtual {p0, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    move-result v1
    if-nez v1, :returnTrue

    const v1, 0x0
    goto :returnFalse
    :returnTrue
    const v1, 0x1
    :returnFalse
    return v1
.end method