Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Patch up MauiCompat to support preview 13 #1814

Merged
merged 16 commits into from
Feb 21, 2022

Conversation

bijington
Copy link
Contributor

Description of Bug

Issues Fixed

  • Fixes #

Behavioral Changes

PR Checklist

  • Has a linked Issue, and the Issue has been approved
  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Changes adhere to coding standard

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@bijington bijington marked this pull request as ready for review February 21, 2022 08:54
Copy link
Contributor

@VladislavAntonyuk VladislavAntonyuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @bijington. I left some minor comments to use generic implementation instead of casting to IFontManager

MauiCompat.sh Outdated Show resolved Hide resolved
MauiCompat.sh Outdated

sed -i '' '1s/^/using Microsoft.Maui.Controls.Platform;/' ./src/CommunityToolkit/Xamarin.CommunityToolkit.MauiCompat/**/SnackBarAppearance.ios.cs

sed -i '' 's/Forms.Font.Default.ToUIFont();/Microsoft.Maui.Font.Default.ToUIFont(Microsoft.Maui.Controls.Application.Current?.Handler.MauiContext?.Services.GetService(typeof(IFontManager)) as IFontManager);/g' ./src/CommunityToolkit/Xamarin.CommunityToolkit.MauiCompat/**/SnackBarAppearance.ios.cs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use

Microsoft.Maui.Controls.Application.Current?.Handler.MauiContext?.Services.GetRequiredService<IFontManager>();

MauiCompat.sh Outdated Show resolved Hide resolved
MauiCompat.sh Outdated
# Typeface

## SnackBar.android
sed -i '' 's/if (arguments.MessageOptions.Font != Font.Default)/var fontManager = sender.Handler?.MauiContext?.Services.GetService(typeof(IFontManager)) as IFontManager;\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use

Microsoft.Maui.Controls.Application.Current?.Handler.MauiContext?.Services.GetRequiredService<IFontManager>();

MauiCompat.sh Outdated Show resolved Hide resolved
MauiCompat.sh Show resolved Hide resolved
MauiCompat.sh Show resolved Hide resolved
@bijington bijington enabled auto-merge (squash) February 21, 2022 12:24
@bijington bijington merged commit a070c2a into xamarin:main Feb 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants