T3-11/14/15 + M2 잔여: 권한 정책 UI(PermissionGate/PermissionRequested 다이얼로그+SavesInProfile), 추적 방지(TrackerBlocklist/WebResourceRequested 차단+실드 배지·팝업), 주소창 진행 바+파라미터 제거 복사(UrlCleaner/NavProgressTracker), U5 완료 알림(Mobile.Core 감지기+Plugin.LocalNotification), 재생중 ongoing 미디어 알림, 썸네일/해상도 API(Thumbnailer 사이드카 캐시+/thumb)+라이브러리 그리드, 외부망 안내(ConnectionTroubleshoot). 147 tests GREEN
This commit is contained in:
parent
27c91c04dd
commit
46c6c321f2
26 changed files with 1058 additions and 30 deletions
43
VideoDownloader.Browser/UrlCleaner.cs
Normal file
43
VideoDownloader.Browser/UrlCleaner.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace VideoDownloader.Browser;
|
||||
|
||||
/// <summary>T3-15: "파라미터 제거 복사" — 추적용 쿼리·프래그먼트를 뺀 URL 반환.</summary>
|
||||
public static class UrlCleaner
|
||||
{
|
||||
public static string? StripQuery(string? url)
|
||||
{
|
||||
if (url == null) return null;
|
||||
var q = url.IndexOf('?');
|
||||
if (q >= 0) url = url[..q];
|
||||
var f = url.IndexOf('#');
|
||||
if (f >= 0) url = url[..f];
|
||||
return url;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>T3-15: 주소창 진행 바 상태 — 진행 중 네비게이션 개수 집계(탭·리다이렉트 중복 안전).</summary>
|
||||
public sealed class NavProgressTracker : INotifyPropertyChanged
|
||||
{
|
||||
private int _count;
|
||||
|
||||
public bool IsNavigating => Volatile.Read(ref _count) > 0;
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
public void Started() => Update(1);
|
||||
public void Completed() => Update(-1);
|
||||
|
||||
private void Update(int delta)
|
||||
{
|
||||
var before = IsNavigating;
|
||||
var c = _count + delta;
|
||||
Volatile.Write(ref _count, Math.Max(0, c)); // 과잉 완료 방지
|
||||
if (before != IsNavigating)
|
||||
OnPropertyChanged(nameof(IsNavigating));
|
||||
}
|
||||
|
||||
private void OnPropertyChanged([CallerMemberName] string? name = null) =>
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue