Signal-Windows icon indicating copy to clipboard operation
Signal-Windows copied to clipboard

fix e164ization while picking contacts

Open Trolldemorted opened this issue 8 years ago • 2 comments
trafficstars

Trolldemorted avatar Aug 22 '17 19:08 Trolldemorted

This is partially addressed with https://github.com/signal-csharp/Signal-Windows/pull/82 but there was one part I didn't fix which could be a Hacktoberfest issue.

golf1052 avatar Oct 15 '17 08:10 golf1052

See the TODO here.

You will want to use the AsYouTypeFormatter from libphonenumber-csharp (which is a port of Google's version) to format the ContactNumber as it is being entered. If the number is formatted correctly then ValidNumber should be set as true.

Here are the AsYouTypeFormatter tests that you can look at.

golf1052 avatar Oct 15 '17 08:10 golf1052