Skip to content
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

[WIP] Ad notifications fail to open if Brave is closed after the Ad notification is shown #2837

Closed
wants to merge 1 commit into from

Conversation

@tmancey
Copy link
Collaborator

tmancey commented Jul 1, 2019

Submitter Checklist:

Test Plan:

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.
@tmancey tmancey added the feature/ads label Jul 1, 2019
@tmancey tmancey requested review from bridiver and bsclifton as code owners Jul 1, 2019
@tmancey tmancey self-assigned this Jul 1, 2019
@tmancey tmancey force-pushed the issues/4102 branch from 00a3009 to 4cc2a6c Jul 1, 2019
@tmancey tmancey requested a review from kylehickinson as a code owner Jul 1, 2019
@tmancey tmancey force-pushed the issues/4102 branch 24 times, most recently from a486aa4 to 4fcc57b Jul 1, 2019
@tmancey tmancey force-pushed the issues/4102 branch 14 times, most recently from e745441 to e43cee8 Jul 3, 2019
Copy link
Collaborator

kylehickinson left a comment

Just a few fixes needed for iOS

@@ -43,5 +42,6 @@ class NativeAdsClient : public ads::AdsClient {
void SetIdleThreshold(const int threshold) override;
uint32_t SetTimer(const uint64_t time_offset) override;
void ShowNotification(std::unique_ptr<ads::NotificationInfo> info) override;
void CloseNotification(const std::string& id) override;

This comment has been minimized.

Copy link
@kylehickinson

kylehickinson Jul 3, 2019

Collaborator

Needs an accompanying implementation in vendor/brave-ios/Ads/Generated/NativeAdsClient.mm which calls the Obj-C bridge method you added in vendor/brave-ios/Ads/Generated/NativeAdsClientBridge.h

{
return [self.commonOps generateUUID];
}

This comment has been minimized.

Copy link
@kylehickinson

kylehickinson Jul 3, 2019

Collaborator

Missing method added in vendor/brave-ios/Ads/Generated/NativeAdsClientBridge.h:

- (void)closeNotification:(const std::string &)id;

You can implement this as an empty method here but please just leave a reference to what its for/this PR

~NotificationInfo();

const std::string ToJson() const;
Result FromJson(
const std::string& json,
std::string* error_description = nullptr);

std::string id;

This comment has been minimized.

Copy link
@kylehickinson

kylehickinson Jul 3, 2019

Collaborator

Added a new field here but iOS has BATAdsNotification which needs the same field:

@tmancey tmancey force-pushed the issues/4102 branch 2 times, most recently from 112823d to 0209f15 Jul 3, 2019
@tmancey tmancey requested a review from kylehickinson Jul 4, 2019
@tmancey tmancey force-pushed the issues/4102 branch 3 times, most recently from 04702db to 23d6164 Jul 5, 2019
@tmancey tmancey force-pushed the issues/4102 branch from 23d6164 to b8968cb Jul 5, 2019
@tmancey
Copy link
Collaborator Author

tmancey commented Jul 10, 2019

Closing as superseded by #2876

@tmancey tmancey closed this Jul 10, 2019
@tmancey tmancey deleted the issues/4102 branch Jul 10, 2019
@tmancey tmancey removed request for bridiver and kylehickinson Jul 10, 2019
@tmancey tmancey added the wontfix label Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.