AniTrend / anitrend-app

Track all your favorite Anime & Manga with AniTrend as it offers anime or manga lookup, tracking and reference powered by AniList
https://anitrend.co
MIT License
194 stars 26 forks source link

Notifications: "User replied to activity you previously replied to." doesn't appear. #113

Closed taichikuji closed 5 years ago

taichikuji commented 5 years ago

AniTrend Issue Guidelines

Before opening a new issue, please take a moment to review our community guidelines to make the contribution process easy and effective for everyone involved.

You may find an answer in already closed issues: https://github.com/AniTrend/anitrend-app/issues?q=is%3Aissue+is%3Aclosed

Description Of Bug

App doesn't seem to show the new type of notification called "User replied to activity you previously replied to."

  1. Open the app
  2. Slide or click:
    icon-01
  3. Click on your profile picture or go to your profile and click:
    icon-02

    Expected Behaviour

    Expected Behaviour should be: -Shows the notification without any issues -That's about it. The new type of notification doesn't go through when it should.

    Screenshots/Videos

    AniListAniTrend

    Device & Build Information

    • Android OS: 7.1.1 ( Also tested on Android 8.0.0 )
    • AniTrend Version: 1.4.6 ( Also tested on 1.4.4 with same results )
    • Phone Brand: BQ
    • Phone Model: Aquaris X5 Plus
    • RAM: 2GB

      Additional Context

      What are you trying to accomplish?

With this fixed, people will receive the new type of notifications and not feel "left out" and having reasons to leave the app and use the website instead.

wax911 commented 5 years ago

Thanks for the issue @taichikuji :tada: @youssefhabri got any ideas on what we might be missing?

youssefhabri commented 5 years ago

The issue appears to be missing ActivityReplySubscribedNotification in the graphql file for notifications. It is implemented in the code (I remember implementing it, not sure how it was removed from the graphql file)

This is the Anilist's own notification query (below). It should be helpful in seeing what's supported:

query ($page: Int, $types: [NotificationType]) {
  Page(page: $page) {
    pageInfo {
      total
      perPage
      currentPage
      lastPage
      hasNextPage
    }
    notifications(type_in: $types, resetNotificationCount: true) {
      ... on AiringNotification {
        id
        type
        episode
        contexts
        media {
          id
          type
          title {
            userPreferred
          }
          coverImage {
            large
          }
        }
        createdAt
      }
      ... on RelatedMediaAdditionNotification {
        id
        type
        context
        media {
          id
          type
          title {
            userPreferred
          }
          coverImage {
            large
          }
        }
        createdAt
      }
      ... on FollowingNotification {
        id
        type
        context
        user {
          id
          name
          avatar {
            large
          }
        }
        createdAt
      }
      ... on ActivityMessageNotification {
        id
        type
        context
        activityId
        user {
          id
          name
          avatar {
            large
          }
        }
        createdAt
      }
      ... on ActivityMentionNotification {
        id
        type
        context
        activityId
        user {
          id
          name
          avatar {
            large
          }
        }
        createdAt
      }
      ... on ActivityReplyNotification {
        id
        type
        context
        activityId
        user {
          id
          name
          avatar {
            large
          }
        }
        createdAt
      }
      ... on ActivityReplySubscribedNotification {
        id
        type
        context
        activityId
        user {
          id
          name
          avatar {
            large
          }
        }
        createdAt
      }
      ... on ActivityLikeNotification {
        id
        type
        context
        activityId
        user {
          id
          name
          avatar {
            large
          }
        }
        createdAt
      }
      ... on ActivityReplyLikeNotification {
        id
        type
        context
        activityId
        user {
          id
          name
          avatar {
            large
          }
        }
        createdAt
      }
      ... on ThreadCommentMentionNotification {
        id
        type
        context
        commentId
        thread {
          id
          title
        }
        user {
          id
          name
          avatar {
            large
          }
        }
        createdAt
      }
      ... on ThreadCommentReplyNotification {
        id
        type
        context
        commentId
        thread {
          id
          title
        }
        user {
          id
          name
          avatar {
            large
          }
        }
        createdAt
      }
      ... on ThreadCommentSubscribedNotification {
        id
        type
        context
        commentId
        thread {
          id
          title
        }
        user {
          id
          name
          avatar {
            large
          }
        }
        createdAt
      }
      ... on ThreadCommentLikeNotification {
        id
        type
        context
        commentId
        thread {
          id
          title
        }
        user {
          id
          name
          avatar {
            large
          }
        }
        createdAt
      }
      ... on ThreadLikeNotification {
        id
        type
        context
        thread {
          id
          title
        }
        user {
          id
          name
          avatar {
            large
          }
        }
        createdAt
      }
    }
  }
}
youssefhabri commented 5 years ago

Seems like the graphql entry was removed in d57b9035544d67951c35db2bb4d237bb6484001e