Skip to content

Commit

Permalink
Events: Remove default getCoalescingKey impls
Browse files Browse the repository at this point in the history
Summary:
Event.java's default implementation of `getCoalescingKey` returns 0. Most overrides of getCoalescingKey just return 0. Delete them.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D28650792

fbshipit-source-id: 374591fb4ba2305df934de412790b3397ca2fa1c
  • Loading branch information
JoshuaGross authored and facebook-github-bot committed May 24, 2021
1 parent faaeb77 commit 900fed5
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,4 @@ public String getEventName() {
protected WritableMap getEventData() {
return Arguments.createMap();
}

@Override
public short getCoalescingKey() {
// All events for a given view can be coalesced.
return 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,4 @@ public String getEventName() {
protected WritableMap getEventData() {
return Arguments.createMap();
}

@Override
public short getCoalescingKey() {
// All events for a given view can be coalesced.
return 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ public String getEventName() {
return EVENT_NAME;
}

@Override
public short getCoalescingKey() {
// All slide events for a given view can be coalesced.
return 0;
}

@Override
protected WritableMap getEventData() {
WritableMap eventData = Arguments.createMap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ public String getEventName() {
return EVENT_NAME;
}

@Override
public short getCoalescingKey() {
// All events for a given view can be coalesced.
return 0;
}

@Override
protected WritableMap getEventData() {
WritableMap eventData = Arguments.createMap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,6 @@ public String getEventName() {
return ScrollEventType.getJSEventName(Assertions.assertNotNull(mScrollEventType));
}

@Override
public short getCoalescingKey() {
// All scroll events for a given view can be coalesced
return 0;
}

@Override
public boolean canCoalesce() {
// Only SCROLL events can be coalesced, all others can not be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ public String getEventName() {
return EVENT_NAME;
}

@Override
public short getCoalescingKey() {
return 0;
}

@Override
public void dispatch(RCTEventEmitter rctEventEmitter) {
rctEventEmitter.receiveEvent(getViewTag(), getEventName(), serializeEventData());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ protected WritableMap getEventData() {
return eventData;
}

@Override
public short getCoalescingKey() {
return 0;
}

@Override
public boolean canCoalesce() {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,4 @@ protected WritableMap getEventData() {
eventData.putBoolean("value", getIsChecked());
return eventData;
}

@Override
public short getCoalescingKey() {
// All switch events for a given view can be coalesced.
return 0;
}
}

0 comments on commit 900fed5

Please sign in to comment.