Code Monkey home page Code Monkey logo

emojibook's People

Contributors

apatronl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emojibook's Issues

WidgetKit beta updates causing minor issues

Some updates to the TimelineProvider Protocol and WidgetConfiguration are causing minor issues within the Provider and Emojibook_Widget structs in Emojibook_Widget.swift.

Updates include:

1. func placeholder has been added, replaces need for placeholder in StaticConfiguration declaration
2. func snapshot renamed to getSnapshot
3. func timeline renamed to getTimeline

I made a very simple PR, but I'm guessing you weren't expecting anyone to do that so your settings don't allow others to create branches. I've not doubt you can handle this on your own but I'm happy to push it up if you change your settings.

ugly copy/paste of my updates:

 struct Provider: TimelineProvider {
-  public typealias Entry = SimpleEntry
+  func placeholder(in context: Context) -> SimpleEntry {
+      SimpleEntry(date: Date(), emojiDetails: EmojiProvider.random())
+  }
 
-  public func snapshot(with context: Context, completion: @escaping (SimpleEntry) -> ()) {
+  public func getSnapshot(in context: Context, completion: @escaping (SimpleEntry) -> ()) {
     let entry = SimpleEntry(date: Date(), emojiDetails: EmojiProvider.random())
     completion(entry)
   }
 
-  public func timeline(with context: Context, completion: @escaping (Timeline<Entry>) -> ()) {
+  public func getTimeline(in context: Context, completion: @escaping (Timeline<Entry>) -> ()) {
     var entries: [SimpleEntry] = []
   public var body: some WidgetConfiguration {
     StaticConfiguration(
       kind: kind,
-      provider: Provider(),
-      placeholder: PlaceholderView()
-    ) { entry in
+      provider: Provider()) { entry in
       Emojibook_WidgetEntryView(entry: entry)
     }
     .configurationDisplayName("Random Emoji")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.