mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-24 08:27:18 +00:00
feat(github): adjust own update check
This commit is contained in:
parent
43dc6a8d4e
commit
ea47e68ebc
1 changed files with 8 additions and 2 deletions
|
|
@ -54,8 +54,9 @@ export class GithubCommonInterfacesService implements IssueServiceInterface {
|
|||
const issue = await this._githubApiService.getById$(+task.issueId, cfg).toPromise();
|
||||
|
||||
const issueUpdate: number = new Date(issue.updated_at).getTime();
|
||||
const commentsByOthers = (cfg.filterUsername && cfg.filterUsername.length > 1)
|
||||
? issue.comments.filter(comment => comment.user.login !== cfg.filterUsername)
|
||||
const filterUserName = cfg.filterUsername && cfg.filterUsername.toLowerCase();
|
||||
const commentsByOthers = (filterUserName && filterUserName.length > 1)
|
||||
? issue.comments.filter(comment => comment.user.login.toLowerCase() !== cfg.filterUsername)
|
||||
: issue.comments;
|
||||
|
||||
// TODO: we also need to handle the case when the user himself updated the issue, to also update the issue...
|
||||
|
|
@ -67,6 +68,11 @@ export class GithubCommonInterfacesService implements IssueServiceInterface {
|
|||
|
||||
const wasUpdated = lastRemoteUpdate > (task.issueLastUpdated || 0);
|
||||
|
||||
// TODO remove after this is resolved
|
||||
console.log('wasUpdated', wasUpdated, ' lastRemoteUpdate', lastRemoteUpdate);
|
||||
console.log(isNotifySuccess, commentsByOthers, updates);
|
||||
console.log('cfg', cfg);
|
||||
|
||||
if (wasUpdated && isNotifySuccess) {
|
||||
this._snackService.open({
|
||||
ico: 'cloud_download',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue