Opened 2 years ago

Closed 2 years ago

#5594 closed change (fixed)

Convert model type for filter lists to Swift type

Reported by: dzhang Assignee: dzhang
Priority: P2 Milestone: Adblock-Plus-for-iOS-next
Module: Adblock-Plus-for-iOS/macOS Keywords: model
Cc: mario, tiago, ashephard, CraftyDeano Blocked By: #5550
Blocking: #5551 Platform: iOS
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29586715/

Description (last modified by dzhang)

Environment

iOS 11, Swift 4

Background

Conversion of ABP to Swift is hampered by the model implemented with OC data structures such as NSDictionaries of NSDictionaries with id-type values. These structures are difficult to work with in Swift due to requiring unwrapping and typecasting. It is better to have a model layer consisting of Swift types because they have greater clarity and utility.

What to change

Establish a data model for the app using Swift types to free the it from legacy OC constraints and make it easier to work in Swift. This is another progressive step in the task of fully converting the app from OC to Swift.

Convert the OC FilterList type to a Swift struct while using appropriate Swift data structures and operations to implement the model class.

Change History (6)

comment:1 Changed 2 years ago by dzhang

  • Priority changed from Unknown to P2

comment:2 Changed 2 years ago by dzhang

  • Cc mario tiago ashephard CraftyDeano added

comment:3 Changed 2 years ago by dzhang

  • Description modified (diff)

comment:4 Changed 2 years ago by dzhang

  • Summary changed from Convert model types for filter lists and background fetches to Swift types to Convert model type for filter lists to Swift type

comment:5 Changed 2 years ago by dzhang

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:6 Changed 2 years ago by dzhang

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.