question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a notification foldout

See original GitHub issue

It would be great to have a notification icon in the corner of the app, just like on the website.

Notifications API

When switching to a repo connected to GitHub (dotcom or Enterprise):

  1. If the app has fetched notifications for the current account Recently™, pull the list of notifications from a cache and display them.
  2. Enqueue a fetch for the current account.

When a fetch is enqueued for an account:

  1. If a fetch has already been enqueued for the account, return without doing anything.
  2. If the next-fetch date stored for the account has passed, fetch for the account immediately.
  3. If the next-fetch date has not passed, wait until it has passed, then fetch for the account immediately.

When fetching for an account immediately,

  1. GET the /notifications endpoint, passing the If-Modified-Since header with the last-modified date saved in the database for the account.
  2. Set the next-fetch date for the account to Date.now() + Number(headers['X-Poll-Interval']) * 1000, where headers contains the HTTP response headers.
  3. Set the last-modified date for the account to the value of the Last-Modified header.
  4. Update the list of notifications.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
nesl247commented, Nov 14, 2018

@billygriffin Hopefully you do reconsider at some point, or get the web team to implement push notifications. This is really the big issue.

3reactions
billygriffincommented, Nov 14, 2018

Thanks for the request here @j-f1, I totally understand how this could be useful. However, we’d like to think about notifications contextually in the course of various workflows. For example, the notification when diverging from default branch is intended to ensure you have the latest from master on your branch. So as we continue to build out functionality please let us know where you see opportunity to potentially integrate contextual notifications, but I don’t think a full port of GitHub notifications into Desktop is going to add a whole lot for folks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create an Expandable Notification
To start, build a notification with all the basic content as described in Create a Notification. Then, call setStyle() with a style object...
Read more >
Scripting API: EditorGUILayout.Foldout
Specifies whether clicking the label toggles the foldout state. The default value is false. Set to true to include the label in the...
Read more >
How to Change Notification Sound in SAMSUNG Galaxy Z ...
Learn more info about SAMSUNG Galaxy Z Fold 4: https://www.hardreset.info/devices/samsung/samsung-galaxy-z-fold4/tutorials/Would you like to ...
Read more >
Manual: UXML element Foldout
Create a new foldout, add two elements to it and add it to the container var cSharpFoldout = new Foldout {text = "Elements"};...
Read more >
Facebook notification bar left position in fold out mode.
I get why they put it there, so you can use your left hand fingers to access it...but it hides the left part...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found