-
-
Notifications
You must be signed in to change notification settings - Fork 734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edit Notifications #2663
Merged
Merged
Edit Notifications #2663
Changes from 1 commit
Commits
Show all changes
207 commits
Select commit
Hold shift + click to select a range
078b517
initial RemoteNotificationsController implementation
5ed5db4
Merge branch 'develop' into feature/T203167
65cca9d
add Notification category, update names
bb3f142
add a new model
3414219
add initial model controller
58af848
update assertion messages
c53877c
add a TODO
32cc469
add remote notifications fetcher
bd85cca
Merge branch 'feature/T193691-back_end' into feature/T203167
5ac5947
rename operationCompletion to completion
a731498
add RemoteNotificationsAPIController
f06ed55
add operationsController to RemoteNotificationsController
f716eab
expand RemoteNotificationsModelController
2a9ad0d
remove RemoteNotificationsFetcher
eb0b2be
add RemoteNotificationsOperationsController
881ec7b
add model and Core Data classes
a2c801c
add initial RemoteNotificationsFetchOperation
ce63875
add initial RemoteNotificationsMarkAsReadOperation
d03a266
make model classes final
97d3077
add RemoteNotificationsOperation
0194f6a
add shouldExecute to operation
42533e1
project changes
018b96f
Merge branch 'develop' into feature/T203167
7580bc6
finish op if shouldn't execute
2071f49
remove Type and Category on decodable result for now
a1fcdd2
pull out Error out of Result so that other decodable structs can use it
79abbd6
update mark
9cea237
Result -> NotificationResult to distinguish between Notifications cal…
1462a99
add MarkReadResult
4d201a0
use new name in method signature
dcd29e2
modify getAllUnreadNotifications to accept subdomains
38af172
add a method to mark notifications as read
1e65eff
remove Wiki enum, use a dict instead
701bb87
make request generic, add params
e20a561
missing bracket
a547199
remove unused params
a529719
accept more params when creating notifications params
ee68709
set listOfWikis for notwikis key
3256acf
add a helper to method to create pipe separated list of values
85c33cf
add a method to create mark as read api call params
082c1b4
re-add mark and struct name
81757af
add a Category enum on RemoteNotification
0ca4db3
add a computed category property on RemoteNotification
d1ddaef
define notification categories that we handle
b6fd5a8
check if notification should be handled before saving
d5c1918
add completions
2f7ec5b
remove html tags when saving notification message
9978640
update params
8adfb3c
call mark as read
6a1c9aa
Merge branch 'develop' into feature/T203167
16ca252
start/stop polling notfications
9b145b9
handle wikidata errors
185628c
modify time interval
5072e3d
start polling when user makes their first edit
d019a37
check if user is logged in for now
54e9253
set polling deadline
2c344b4
add assertions
723de6c
modify time interval, consolidate assertions
77f0bbf
validate age
6b03844
move start
b7d3ed0
consolidate assertions
69b2c55
stop controller if user not logged in
c4b195c
restart start time
f1775e5
remove print
c8669fc
stop controller if store not set up
705b2b5
true -> false
39f1318
make CSRFOperation return info re token in completion
3dd26dd
remove unused isLoggedIn method
4716668
Merge branch 'develop' into feature/T203167
joewalsh 3869698
Observe remote notifications changes in the AppViewController
487192d
add a missing completion call
8167dab
rename Category on RemoteNotification to RemoteNotificationCategory, …
cd1a3ec
group notifications by category number so that @objc can work with them
7b9361f
use new name
bf74deb
pass an array of notifications to mark as read
587a102
show an alert for edit reverts
238d6f8
add a button to RMessageView
04b67ce
use theme colors to set button's title color
55ec9a6
add a method to show an alert with Read more button
71c6a7e
add ReadMoreAboutRevertedEditViewController
5b261d4
localize strings
dfa5a37
project changes
e581cba
update constraints
f69c2af
theme themeable's root vc
45ab69a
update colors
0b3eb64
fetch wikidata id when fetching article
9cbb254
add a func to fetch wikidata id
882ea28
store wikidata id
f624230
store page id and agent
eaa3bb6
delegate button tap
563c6c3
add a method to fetch article with wikidata id
3e84048
show alert
b226574
add method to fetch on the context
d8612c7
add a TODO
6defad2
different string for multiple notifications
5129747
fix typo, mark as read
02a58ca
make sure we never create notifications without ids
a04ce41
add a method to mark notifications as read by providing notification ids
df23a6c
pull out marking notifications as read and saving moc
9d170bd
use new method
2d37827
mark notifications as read using ids
0aa3283
add strings relevants to local edit revert notifications
b34b335
add a method to remove pending notifications
6146d2b
add a method to show read more vc
261cdd1
prepare for showing the alert or scheduling a notifcation
fa89fe1
keep mark as read block around so that there's no need to pass respon…
92f145e
schedule notification
4d91e51
show alert
fb06726
show edit reverted notifications only when app is in the bg
bcd1835
respond to notification's actions
298f7a0
update ReadMoreAboutRevertedEditViewControllerDelegate, keep keys ins…
b2cdbf2
update strings
bc80ad4
implement delegate methods
048abbf
format, remove ;
d7fd431
add new action
0a76c3d
localize
a55cd26
wrap the rest of the op in an else statement
dbc58bd
fetch wikidata id on a background thread
03c0bca
single completion
291b17e
indent
06b8cbb
Merge branch 'develop' into feature/T203167
857a0f1
use mobileview to get wikibase_item
78af38e
Merge branch 'feature/T203167' of https://github.com/wikimedia/wikipe…
2b3cb30
fix typo
a47d0d1
update sync interval
e921e04
use WMFJoinedPropertyParameters
10ef1fa
Merge branch 'develop' into feature/T203167
20f1539
update attribute name
a78b133
add isExcluded
460bc0c
add isExcluded to CoreDataProperties
7e41ef8
exclude notifications without article context
e589c59
Merge branch 'feature/T203167' of https://github.com/wikimedia/wikipe…
d4b434b
always show native notifications, regardless of app state
ccee068
move 'Reverted edit' to Common Strings
0e80eca
update naming, take a single notification
b474fe8
schedule individual native notifications
5330aaf
mark a single notification
e4b8f29
unpack new user info dict and show read more vc
f17b465
pass articleURL to ReadMoreAboutRevertedEditViewController
40fe32c
remove any notion of multiple notifications from ReadMoreAboutReverte…
773a047
update ReadMoreAboutRevertedEditViewControllerDelegate
ff7eddd
update ReadMoreAboutRevertedEditViewControllerDelegate methods, spacing
9790824
update edit reverted notification keys
9e48882
localization updates
8e6b688
remove assertion
6615b27
remark unseen notifications
44f0c8f
add a new case to RemoteNotificationsModelChangeType
b674973
post the model change notifications in a separate method
3930d4e
notify when objects are updated
7c9de61
read defaults to false
96105e6
switch on model change type
fbe5c7d
add a separate method to schedule notifications
3af7816
check article stuff first
81d22ac
Merge branch 'develop' into feature/T203167
9af52f8
remove test method
63f5d98
keep response coordinator around
1924573
mark notifications as seen
0b63b9c
operate on single notifications
34e5474
finish if there are no fetched notifications and no saved notificatio…
e4b1fa8
Merge branch 'develop' into feature/T203167
87adab6
clone mediawiki auth cookies
4ca2472
Merge branch 'feature/T203167' of https://github.com/wikimedia/wikipe…
2f9a09a
stop polling when user makes an anon edit
231b2f5
restart polling when user logs in
cc7c7f7
stop & start if syncTimer wasn't nilled out
d9020a4
add localization updated from merge with develop
c43ee49
Merge branch 'develop' into feature/T203167
3c74bd8
add a remote notifications controller toggle
4c1aff1
Merge branch 'develop' into feature/T203167
5c54e54
include wikidataID when comparing articles
361efdd
add wikibase_item to Obama fixture
beb70d0
return nil if dict nil
619a315
Merge branch 'bug/wikidata_api_en' into feature/T203167
aa8d778
Merge branch 'develop' into feature/T203167
2514a0f
revert changes to library version
d615da1
Merge branch 'feature/T203167' of https://github.com/wikimedia/wikipe…
4f2b235
remove wikidataFetcher from article fetcher
43c0254
remove unused removePendingNotificationRequestsWithIdentifiers
4b2b076
Merge branch 'develop' into feature/T203167
joewalsh 84a9d32
Merge branch 'feature/T203167' of github-joewalsh:wikimedia/wikipedia…
joewalsh 813d4c5
use notification extension & separate obj-c class, fix release build …
joewalsh 1f93778
remove extension for notification names, use static let
joewalsh bab1edd
save wmf key value
caa243d
check if logged in & made authorized wikidata edit before polling
d4eabe4
move time management to a separate class
3eae88a
don't start on main
f504d6f
pass context
4abbc0a
use an OptionSet in lieu of bools
ac72028
use enum for state
00e9f98
don't fetch token for get requests
13418a7
send viewContext not private context
0fb081c
don't set bodyEncoding
a6760e6
store time on remote notifications context
c0c87a5
inject session
7479cf6
don't force unwrap
231fc30
use state in predicates
45314b3
use dispatchsource
joewalsh 25ee41f
add index
02a57c1
create a wrapper around DispatchSourceTimer
deca4e2
use WMFDispatchSourceTimer when scheduling remote notifications opera…
e5025c5
add a deadlineController
2433edc
Merge branch 'develop' into feature/T203167
422a682
remove duplicate prop declaration
97158b3
make model controller's init failable
34f2ba0
lock if model controller fails to init
424b93b
use preferred language codes
6df1720
fix typo
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it better to keep this value on the
viewContext
or addWMFKeyValue
toRemoteNotifications.xcdatamodeld
(like inEventLogging.xcdatamodeld
) and use the private context created byRemoteNotificationsModelController
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be better to use the private context