From bce6cacc4152a98425a48fd487af302d2c08813b Mon Sep 17 00:00:00 2001 From: Yang Xu Date: Fri, 8 Jan 2021 18:16:29 +0800 Subject: [PATCH] little change --- Sources/SwipeCell/ScrollNotification.swift | 11 ----------- Sources/SwipeCell/ViewExtension.swift | 12 ++++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Sources/SwipeCell/ScrollNotification.swift b/Sources/SwipeCell/ScrollNotification.swift index f4edf25..41dbc22 100644 --- a/Sources/SwipeCell/ScrollNotification.swift +++ b/Sources/SwipeCell/ScrollNotification.swift @@ -233,15 +233,4 @@ extension View { } } -public struct CellStatusKey: EnvironmentKey { - public static var defaultValue: CellStatus = .showCell -} -extension EnvironmentValues { - public var cellStatus: CellStatus { - get { self[CellStatusKey.self] } - set { - self[CellStatusKey.self] = newValue - } - } -} diff --git a/Sources/SwipeCell/ViewExtension.swift b/Sources/SwipeCell/ViewExtension.swift index 323bed6..605419e 100644 --- a/Sources/SwipeCell/ViewExtension.swift +++ b/Sources/SwipeCell/ViewExtension.swift @@ -82,3 +82,15 @@ extension View { } } +public struct CellStatusKey: EnvironmentKey { + public static var defaultValue: CellStatus = .showCell +} + +extension EnvironmentValues { + public var cellStatus: CellStatus { + get { self[CellStatusKey.self] } + set { + self[CellStatusKey.self] = newValue + } + } +}