Opened on 08/30/2017 at 03:25:53 AM

Closed on 10/27/2017 at 03:43:00 AM

#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.

Attachments (0)

Change History (6)

comment:1 Changed on 08/31/2017 at 04:57:43 PM by dzhang

  • Priority changed from Unknown to P2

comment:2 Changed on 09/02/2017 at 12:17:51 AM by dzhang

  • Cc mario tiago ashephard CraftyDeano added

comment:3 Changed on 09/13/2017 at 03:37:39 AM by dzhang

  • Description modified (diff)

comment:4 Changed on 09/13/2017 at 03:38:18 AM 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 on 10/24/2017 at 12:55:15 AM by dzhang

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

comment:6 Changed on 10/27/2017 at 03:43:00 AM by dzhang

  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from dzhang.
 
Note: See TracTickets for help on using tickets.